view: Free the data on error exit (Coverity).

This commit is contained in:
Marcus Meissner 2013-09-29 19:33:57 +02:00 committed by Alexandre Julliard
parent a6550abee5
commit 8953e8d7ee
1 changed files with 4 additions and 1 deletions

View File

@ -166,8 +166,10 @@ static HMETAFILE GetPlaceableMetaFile( LPCWSTR szFileName )
}
CloseHandle( handle );
if (!(hmf = SetMetaFileBitsEx(mfHeader.mtSize*2, lpData)))
if (!(hmf = SetMetaFileBitsEx(mfHeader.mtSize*2, lpData))) {
GlobalFree(lpData);
return 0;
}
width = APMHeader.bbox.Right - APMHeader.bbox.Left;
@ -181,6 +183,7 @@ static HMETAFILE GetPlaceableMetaFile( LPCWSTR szFileName )
deltax = 0;
deltay = 0 ;
GlobalFree(lpData);
return hmf;
}