Author: jgardou Date: Thu Sep 18 13:27:02 2014 New Revision: 64190
URL: http://svn.reactos.org/svn/reactos?rev=64190&view=rev Log: [WIN32K] - Fix error handling in NtGdiPathToRegion
Modified: trunk/reactos/win32ss/gdi/ntgdi/path.c
Modified: trunk/reactos/win32ss/gdi/ntgdi/path.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/path.c?re... ============================================================================== --- trunk/reactos/win32ss/gdi/ntgdi/path.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/ntgdi/path.c [iso-8859-1] Thu Sep 18 13:27:02 2014 @@ -2716,19 +2716,20 @@ { PATH_UnlockPath(pPath); DC_UnlockDc(pDc); + return NULL; } hrgnRval = Rgn->BaseObject.hHmgr; /* FIXME: Should we empty the path even if conversion failed? */ if (PATH_PathToRegion(pPath, pdcattr->jFillMode, Rgn)) { PATH_EmptyPath(pPath); + RGNOBJAPI_Unlock(Rgn); } else { - GreDeleteObject(hrgnRval); + REGION_Delete(Rgn); hrgnRval = NULL; } - RGNOBJAPI_Unlock(Rgn); }
PATH_UnlockPath(pPath);