https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6416ee982fae08766478784adedae54cca7c0869

commit 6416ee982fae08766478784adedae54cca7c0869
Author:     Pierre Schweitzer <pie...@reactos.org>
AuthorDate: Fri Nov 16 21:42:42 2018 +0100
Commit:     Pierre Schweitzer <pie...@reactos.org>
CommitDate: Fri Nov 16 22:07:08 2018 +0100

    [WIN32SS] Don't leak memory on failure in IntGdiWidenPath().
    
    CID 1441350
---
 win32ss/gdi/ntgdi/path.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/win32ss/gdi/ntgdi/path.c b/win32ss/gdi/ntgdi/path.c
index a3e2ea0cdd..4a5277a9fe 100644
--- a/win32ss/gdi/ntgdi/path.c
+++ b/win32ss/gdi/ntgdi/path.c
@@ -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;

Reply via email to