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
adaa984b
Commit
adaa984b
authored
Mar 28, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 28, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbgeng: Use CRT allocation functions.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7f96b7b1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
13 deletions
+11
-13
dbgeng.c
dlls/dbgeng/dbgeng.c
+11
-13
No files found.
dlls/dbgeng/dbgeng.c
View file @
adaa984b
...
...
@@ -31,7 +31,6 @@
#include "dbgeng.h"
#include "wine/debug.h"
#include "wine/heap.h"
#include "wine/list.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
dbgeng
);
...
...
@@ -149,12 +148,12 @@ static HRESULT debug_target_init_modules_info(struct target_process *target)
count
=
needed
/
sizeof
(
HMODULE
);
if
(
!
(
modules
=
heap_alloc
(
count
*
sizeof
(
*
modules
))))
if
(
!
(
modules
=
calloc
(
count
,
sizeof
(
*
modules
))))
return
E_OUTOFMEMORY
;
if
(
!
(
target
->
modules
.
info
=
heap_alloc_zero
(
count
*
sizeof
(
*
target
->
modules
.
info
))))
if
(
!
(
target
->
modules
.
info
=
calloc
(
count
,
sizeof
(
*
target
->
modules
.
info
))))
{
heap_
free
(
modules
);
free
(
modules
);
return
E_OUTOFMEMORY
;
}
...
...
@@ -179,7 +178,7 @@ static HRESULT debug_target_init_modules_info(struct target_process *target)
target
->
cpu_type
=
debug_target_get_module_machine
(
target
,
modules
[
0
]);
heap_
free
(
modules
);
free
(
modules
);
target
->
modules
.
loaded
=
count
;
target
->
modules
.
unloaded
=
0
;
/* FIXME */
...
...
@@ -331,8 +330,8 @@ static ULONG STDMETHODCALLTYPE debugclient_AddRef(IDebugClient7 *iface)
static
void
debug_target_free
(
struct
target_process
*
target
)
{
heap_
free
(
target
->
modules
.
info
);
heap_
free
(
target
);
free
(
target
->
modules
.
info
);
free
(
target
);
}
static
ULONG
STDMETHODCALLTYPE
debugclient_Release
(
IDebugClient7
*
iface
)
...
...
@@ -353,7 +352,7 @@ static ULONG STDMETHODCALLTYPE debugclient_Release(IDebugClient7 *iface)
}
if
(
debug_client
->
event_callbacks
)
debug_client
->
event_callbacks
->
lpVtbl
->
Release
(
debug_client
->
event_callbacks
);
heap_
free
(
debug_client
);
free
(
debug_client
);
}
return
refcount
;
...
...
@@ -443,7 +442,7 @@ static HRESULT STDMETHODCALLTYPE debugclient_AttachProcess(IDebugClient7 *iface,
return
E_NOTIMPL
;
}
if
(
!
(
process
=
heap_alloc_zero
(
sizeof
(
*
process
))))
if
(
!
(
process
=
calloc
(
1
,
sizeof
(
*
process
))))
return
E_OUTOFMEMORY
;
process
->
pid
=
pid
;
...
...
@@ -1900,7 +1899,7 @@ static HRESULT STDMETHODCALLTYPE debugsymbols_GetModuleVersionInformation(IDebug
if
(
!
(
size
=
GetFileVersionInfoSizeA
(
info
->
image_name
,
&
handle
)))
return
E_FAIL
;
if
(
!
(
version_info
=
heap_
alloc
(
size
)))
if
(
!
(
version_info
=
m
alloc
(
size
)))
return
E_OUTOFMEMORY
;
if
(
GetFileVersionInfoA
(
info
->
image_name
,
handle
,
size
,
version_info
))
...
...
@@ -1921,7 +1920,7 @@ static HRESULT STDMETHODCALLTYPE debugsymbols_GetModuleVersionInformation(IDebug
}
}
heap_
free
(
version_info
);
free
(
version_info
);
return
hr
;
}
...
...
@@ -4033,8 +4032,7 @@ HRESULT WINAPI DebugCreate(REFIID riid, void **obj)
TRACE
(
"%s, %p.
\n
"
,
debugstr_guid
(
riid
),
obj
);
debug_client
=
heap_alloc_zero
(
sizeof
(
*
debug_client
));
if
(
!
debug_client
)
if
(
!
(
debug_client
=
calloc
(
1
,
sizeof
(
*
debug_client
))))
return
E_OUTOFMEMORY
;
debug_client
->
IDebugClient_iface
.
lpVtbl
=
&
debugclientvtbl
;
...
...
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