Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
ed531275
Commit
ed531275
authored
Apr 20, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Do not allocate spyed memory array on freeing attempts.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3c7fddbc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
14 deletions
+11
-14
ifs.c
dlls/ole32/ifs.c
+11
-14
No files found.
dlls/ole32/ifs.c
View file @
ed531275
...
...
@@ -128,22 +128,19 @@ static void** mallocspy_is_allocation_spyed(const void *mem)
return
current
;
}
static
BOOL
RemoveMemoryLocation
(
LPCVOID
pM
em
)
static
BOOL
mallocspy_remove_spyed_memory
(
const
void
*
m
em
)
{
LPVOID
*
C
urrent
;
void
**
c
urrent
;
/* allocate the table if not already allocated */
if
(
!
Malloc32
.
SpyedBlockTableLength
&&
!
SetSpyedBlockTableLength
(
0x1000
))
return
FALSE
;
if
(
!
Malloc32
.
SpyedBlockTableLength
)
return
FALSE
;
if
(
!
(
Current
=
mallocspy_is_allocation_spyed
(
pM
em
)))
return
FALSE
;
if
(
!
(
current
=
mallocspy_is_allocation_spyed
(
m
em
)))
return
FALSE
;
/* location found */
Malloc32
.
SpyedAllocationsLeft
--
;
/*TRACE("%lu\n",Malloc32.SpyedAllocationsLeft);*/
*
Current
=
NULL
;
return
TRUE
;
Malloc32
.
SpyedAllocationsLeft
--
;
*
current
=
NULL
;
return
TRUE
;
}
/******************************************************************************
...
...
@@ -216,7 +213,7 @@ static void * WINAPI IMalloc_fnRealloc(IMalloc *iface, void *pv, SIZE_T cb)
BOOL
fSpyed
;
EnterCriticalSection
(
&
IMalloc32_SpyCS
);
fSpyed
=
RemoveMemoryLocation
(
pv
);
fSpyed
=
mallocspy_remove_spyed_memory
(
pv
);
cb
=
IMallocSpy_PreRealloc
(
Malloc32
.
pSpy
,
pv
,
cb
,
&
pRealMemory
,
fSpyed
);
/* check if can release the spy */
...
...
@@ -268,7 +265,7 @@ static void WINAPI IMalloc_fnFree(IMalloc *iface, void *pv)
if
(
Malloc32
.
pSpy
)
{
EnterCriticalSection
(
&
IMalloc32_SpyCS
);
fSpyed
=
RemoveMemoryLocation
(
pv
);
fSpyed
=
mallocspy_remove_spyed_memory
(
pv
);
pv
=
IMallocSpy_PreFree
(
Malloc32
.
pSpy
,
pv
,
fSpyed
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment