mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
CreateMetaFileW: Free memory on error
svn path=/trunk/; revision=42896
This commit is contained in:
parent
91ae05b80d
commit
c3d83ebfa9
1 changed files with 3 additions and 0 deletions
|
@ -160,6 +160,7 @@ CreateMetaFileW(
|
|||
(LPTSTR*) &lpszFile))
|
||||
{
|
||||
// MFDRV_DeleteDC( dc->physDev );
|
||||
LocalFree(pmfDC);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -167,12 +168,14 @@ CreateMetaFileW(
|
|||
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;
|
||||
|
|
Loading…
Reference in a new issue