[WIN32SS] Don't leak memory on failure in IntGdiWidenPath().
authorPierre Schweitzer <pierre@reactos.org>
Fri, 16 Nov 2018 20:42:42 +0000 (21:42 +0100)
committerPierre Schweitzer <pierre@reactos.org>
Fri, 16 Nov 2018 21:07:08 +0000 (22:07 +0100)
CID 1441350

win32ss/gdi/ntgdi/path.c

index a3e2ea0..4a5277a 100644 (file)
@@ -1777,6 +1777,7 @@ IntGdiWidenPath(PPATH pPath, UINT penWidth, UINT penStyle, FLOAT eMiterLimit)
                     pStrokes = ExAllocatePoolWithTag(PagedPool, numStrokes * sizeof(*pStrokes), TAG_PATH);
                     if (!pStrokes)
                     {
+                       ExFreePoolWithTag(pOldStrokes, TAG_PATH);
                        PATH_UnlockPath(flat_path);
                        PATH_Delete(flat_path->BaseObject.hHmgr);
                        return NULL;