Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
eb81fa28
Commit
eb81fa28
authored
Dec 14, 2009
by
Rob Shearman
Committed by
Alexandre Julliard
Dec 14, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Fix memory leaks on EMF_Create_HENHMETAFILE failure.
parent
d18ad163
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
enhmetafile.c
dlls/gdi32/enhmetafile.c
+9
-1
No files found.
dlls/gdi32/enhmetafile.c
View file @
eb81fa28
...
...
@@ -466,8 +466,12 @@ UINT WINAPI GetEnhMetaFileDescriptionW(
HENHMETAFILE
WINAPI
SetEnhMetaFileBits
(
UINT
bufsize
,
const
BYTE
*
buf
)
{
ENHMETAHEADER
*
emh
=
HeapAlloc
(
GetProcessHeap
(),
0
,
bufsize
);
HENHMETAFILE
hmf
;
memmove
(
emh
,
buf
,
bufsize
);
return
EMF_Create_HENHMETAFILE
(
emh
,
FALSE
);
hmf
=
EMF_Create_HENHMETAFILE
(
emh
,
FALSE
);
if
(
!
hmf
)
HeapFree
(
GetProcessHeap
(),
0
,
emh
);
return
hmf
;
}
/*****************************************************************************
...
...
@@ -2509,6 +2513,8 @@ HENHMETAFILE WINAPI CopyEnhMetaFileA(
emrDst
=
HeapAlloc
(
GetProcessHeap
(),
0
,
emrSrc
->
nBytes
);
memcpy
(
emrDst
,
emrSrc
,
emrSrc
->
nBytes
);
hmfDst
=
EMF_Create_HENHMETAFILE
(
emrDst
,
FALSE
);
if
(
!
hmfDst
)
HeapFree
(
GetProcessHeap
(),
0
,
emrDst
);
}
else
{
HANDLE
hFile
;
DWORD
w
;
...
...
@@ -2549,6 +2555,8 @@ HENHMETAFILE WINAPI CopyEnhMetaFileW(
emrDst
=
HeapAlloc
(
GetProcessHeap
(),
0
,
emrSrc
->
nBytes
);
memcpy
(
emrDst
,
emrSrc
,
emrSrc
->
nBytes
);
hmfDst
=
EMF_Create_HENHMETAFILE
(
emrDst
,
FALSE
);
if
(
!
hmfDst
)
HeapFree
(
GetProcessHeap
(),
0
,
emrDst
);
}
else
{
HANDLE
hFile
;
DWORD
w
;
...
...
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