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
01b32951
Commit
01b32951
authored
Dec 31, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
Jan 04, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Fix a memory leak in GdipCreateMetafileFromWmf.
parent
0c582dca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
graphics.c
dlls/gdiplus/graphics.c
+7
-4
No files found.
dlls/gdiplus/graphics.c
View file @
01b32951
...
...
@@ -1217,7 +1217,7 @@ GpStatus WINGDIPAPI GdipCreateMetafileFromWmf(HMETAFILE hwmf, BOOL delete,
UINT
read
;
BYTE
*
copy
;
HENHMETAFILE
hemf
;
GpStatus
retval
=
GenericError
;
GpStatus
retval
=
Ok
;
TRACE
(
"(%p, %d, %p, %p)
\n
"
,
hwmf
,
delete
,
placeable
,
metafile
);
...
...
@@ -1242,6 +1242,7 @@ GpStatus WINGDIPAPI GdipCreateMetafileFromWmf(HMETAFILE hwmf, BOOL delete,
if
(
CreateStreamOnHGlobal
(
copy
,
TRUE
,
&
stream
)
!=
S_OK
){
ERR
(
"could not make stream
\n
"
);
GdipFree
(
copy
);
retval
=
GenericError
;
goto
err
;
}
...
...
@@ -1253,7 +1254,10 @@ GpStatus WINGDIPAPI GdipCreateMetafileFromWmf(HMETAFILE hwmf, BOOL delete,
if
(
OleLoadPicture
(
stream
,
0
,
FALSE
,
&
IID_IPicture
,
(
LPVOID
*
)
&
((
*
metafile
)
->
image
.
picture
))
!=
S_OK
)
{
retval
=
GenericError
;
goto
err
;
}
(
*
metafile
)
->
image
.
type
=
ImageTypeMetafile
;
...
...
@@ -1277,10 +1281,9 @@ GpStatus WINGDIPAPI GdipCreateMetafileFromWmf(HMETAFILE hwmf, BOOL delete,
TRACE
(
"<-- %p
\n
"
,
*
metafile
);
return
Ok
;
err
:
GdipFree
(
*
metafile
);
if
(
retval
!=
Ok
)
GdipFree
(
*
metafile
);
IStream_Release
(
stream
);
return
retval
;
}
...
...
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