Author: gschneider
Date: Mon Aug 24 01:09:55 2009
New Revision: 42896
URL:
http://svn.reactos.org/svn/reactos?rev=42896&view=rev
Log:
CreateMetaFileW: Free memory on error
Modified:
trunk/reactos/dll/win32/gdi32/objects/metafile.c
Modified: trunk/reactos/dll/win32/gdi32/objects/metafile.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/me…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/metafile.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/gdi32/objects/metafile.c [iso-8859-1] Mon Aug 24 01:09:55
2009
@@ -160,6 +160,7 @@
(LPTSTR*) &lpszFile))
{
// MFDRV_DeleteDC( dc->physDev );
+ LocalFree(pmfDC);
return NULL;
}
@@ -167,12 +168,14 @@
CREATE_ALWAYS, 0, 0)) == INVALID_HANDLE_VALUE)
{
// MFDRV_DeleteDC( dc->physDev );
+ LocalFree(pmfDC);
return NULL;
}
if (!WriteFile( hFile, &pmfDC->mh, sizeof(pmfDC->mh), NULL, NULL ))
{
// MFDRV_DeleteDC( dc->physDev );
+ LocalFree(pmfDC);
return NULL;
}
pmfDC->hFile = hFile;