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
a1cee57c
Commit
a1cee57c
authored
Nov 26, 2003
by
Dimitrie O. Paun
Committed by
Alexandre Julliard
Nov 26, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix mem leak when GlobalReAlloc() fails.
parent
99bf92e3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
11 deletions
+14
-11
hglobalstream.c
dlls/ole32/hglobalstream.c
+6
-3
memlockbytes.c
dlls/ole32/memlockbytes.c
+4
-4
memlockbytes16.c
dlls/ole32/memlockbytes16.c
+4
-4
No files found.
dlls/ole32/hglobalstream.c
View file @
a1cee57c
...
...
@@ -626,6 +626,7 @@ HRESULT WINAPI HGLOBALStreamImpl_SetSize(
ULARGE_INTEGER
libNewSize
)
/* [in] */
{
HGLOBALStreamImpl
*
const
This
=
(
HGLOBALStreamImpl
*
)
iface
;
HGLOBAL
supportHandle
;
TRACE
(
"(%p, %ld)
\n
"
,
iface
,
libNewSize
.
s
.
LowPart
);
...
...
@@ -641,10 +642,12 @@ HRESULT WINAPI HGLOBALStreamImpl_SetSize(
/*
* Re allocate the HGlobal to fit the new size of the stream.
*/
This
->
supportHandle
=
GlobalReAlloc
(
This
->
supportHandle
,
libNewSize
.
s
.
LowPart
,
0
);
supportHandle
=
GlobalReAlloc
(
This
->
supportHandle
,
libNewSize
.
s
.
LowPart
,
0
);
if
(
supportHandle
==
0
)
return
STG_E_MEDIUMFULL
;
This
->
supportHandle
=
supportHandle
;
This
->
streamSize
.
s
.
LowPart
=
libNewSize
.
s
.
LowPart
;
return
S_OK
;
...
...
dlls/ole32/memlockbytes.c
View file @
a1cee57c
...
...
@@ -545,6 +545,7 @@ HRESULT WINAPI HGLOBALLockBytesImpl_SetSize(
ULARGE_INTEGER
libNewSize
)
/* [in] */
{
HGLOBALLockBytesImpl
*
const
This
=
(
HGLOBALLockBytesImpl
*
)
iface
;
HGLOBAL
supportHandle
;
/*
* As documented.
...
...
@@ -558,13 +559,12 @@ HRESULT WINAPI HGLOBALLockBytesImpl_SetSize(
/*
* Re allocate the HGlobal to fit the new size of the stream.
*/
This
->
supportHandle
=
GlobalReAlloc
(
This
->
supportHandle
,
libNewSize
.
s
.
LowPart
,
0
);
supportHandle
=
GlobalReAlloc
(
This
->
supportHandle
,
libNewSize
.
s
.
LowPart
,
0
);
if
(
This
->
supportHandle
==
0
)
if
(
supportHandle
==
0
)
return
STG_E_MEDIUMFULL
;
This
->
supportHandle
=
supportHandle
;
This
->
byteArraySize
.
s
.
LowPart
=
libNewSize
.
s
.
LowPart
;
return
S_OK
;
...
...
dlls/ole32/memlockbytes16.c
View file @
a1cee57c
...
...
@@ -469,6 +469,7 @@ HRESULT WINAPI HGLOBALLockBytesImpl16_SetSize(
ULARGE_INTEGER
libNewSize
)
/* [in] */
{
HGLOBALLockBytesImpl16
*
const
This
=
(
HGLOBALLockBytesImpl16
*
)
iface
;
HGLOBAL16
supportHandle
;
TRACE
(
"(%p,%ld)
\n
"
,
This
,
libNewSize
.
s
.
LowPart
);
/*
...
...
@@ -483,13 +484,12 @@ HRESULT WINAPI HGLOBALLockBytesImpl16_SetSize(
/*
* Re allocate the HGlobal to fit the new size of the stream.
*/
This
->
supportHandle
=
GlobalReAlloc16
(
This
->
supportHandle
,
libNewSize
.
s
.
LowPart
,
0
);
supportHandle
=
GlobalReAlloc16
(
This
->
supportHandle
,
libNewSize
.
s
.
LowPart
,
0
);
if
(
This
->
supportHandle
==
0
)
if
(
supportHandle
==
0
)
return
STG_E_MEDIUMFULL
;
This
->
supportHandle
=
supportHandle
;
This
->
byteArraySize
.
s
.
LowPart
=
libNewSize
.
s
.
LowPart
;
return
S_OK
;
...
...
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