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
921df719
Commit
921df719
authored
Oct 11, 2003
by
Dimitrie O. Paun
Committed by
Alexandre Julliard
Oct 11, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some instances of memory allocation through HeapReAlloc().
parent
9973af57
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
dmusic.c
dlls/dmusic/dmusic.c
+2
-1
hash.c
programs/winedbg/hash.c
+3
-1
macro.c
programs/winhelp/macro.c
+4
-3
No files found.
dlls/dmusic/dmusic.c
View file @
921df719
...
...
@@ -133,7 +133,8 @@ HRESULT WINAPI IDirectMusic8Impl_CreatePort (LPDIRECTMUSIC8 iface, REFCLSID rcls
TRACE
(
"(%p, %s, %p, %p, %p)
\n
"
,
This
,
debugstr_guid
(
rclsidPort
),
pPortParams
,
ppPort
,
pUnkOuter
);
for
(
i
=
0
;
S_FALSE
!=
IDirectMusic8Impl_EnumPort
(
iface
,
i
,
&
PortCaps
);
i
++
)
{
if
(
IsEqualCLSID
(
rclsidPort
,
&
PortCaps
.
guidPort
))
{
This
->
ppPorts
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
This
->
ppPorts
,
sizeof
(
LPDIRECTMUSICPORT
)
*
This
->
nrofports
);
if
(
!
This
->
ppPorts
)
This
->
ppPorts
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
LPDIRECTMUSICPORT
)
*
This
->
nrofports
);
else
This
->
ppPorts
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
This
->
ppPorts
,
sizeof
(
LPDIRECTMUSICPORT
)
*
This
->
nrofports
);
if
(
NULL
==
This
->
ppPorts
[
This
->
nrofports
])
{
*
ppPort
=
(
LPDIRECTMUSICPORT
)
NULL
;
return
E_OUTOFMEMORY
;
...
...
programs/winedbg/hash.c
View file @
921df719
...
...
@@ -1339,7 +1339,9 @@ void DEBUG_InfoSymbols(const char* str)
{
if
(
num_used_array
==
num_alloc_array
)
{
array
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
array
,
sizeof
(
*
array
)
*
(
num_alloc_array
+=
32
));
int
size
=
sizeof
(
*
array
)
*
(
num_alloc_array
+=
32
);
if
(
!
array
)
array
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
else
array
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
array
,
size
);
if
(
!
array
)
return
;
}
array
[
num_used_array
++
]
=
nh
;
...
...
programs/winhelp/macro.c
View file @
921df719
...
...
@@ -832,6 +832,7 @@ void MACRO_RegisterRoutine(LPCSTR dll, LPCSTR proc, LPCSTR args)
{
HANDLE
hLib
;
void
(
*
fn
)();
int
size
;
WINE_TRACE
(
"(
\"
%s
\"
,
\"
%s
\"
,
\"
%s
\"
)
\n
"
,
dll
,
proc
,
args
);
...
...
@@ -849,9 +850,9 @@ void MACRO_RegisterRoutine(LPCSTR dll, LPCSTR proc, LPCSTR args)
}
/* FIXME: the library will not be unloaded until exit of program */
MACRO_Loaded
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
MACRO_Loaded
,
++
MACRO_NumLoaded
*
sizeof
(
struct
MacroDesc
)
);
size
=
++
MACRO_NumLoaded
*
sizeof
(
struct
MacroDesc
);
if
(
!
MACRO_Loaded
)
MACRO_Loaded
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
else
MACRO_Loaded
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
MACRO_Loaded
,
size
);
MACRO_Loaded
[
MACRO_NumLoaded
-
1
].
name
=
strdup
(
proc
);
/* FIXME */
MACRO_Loaded
[
MACRO_NumLoaded
-
1
].
alias
=
NULL
;
MACRO_Loaded
[
MACRO_NumLoaded
-
1
].
isBool
=
0
;
...
...
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