[CONSOLE]
authorPierre Schweitzer <pierre@reactos.org>
Sun, 17 May 2015 10:20:58 +0000 (10:20 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Sun, 17 May 2015 10:20:58 +0000 (10:20 +0000)
Fix memory leaks

svn path=/trunk/; revision=67805

reactos/dll/cpl/console/layout.c

index b211b63..dc7d627 100644 (file)
@@ -140,6 +140,7 @@ PaintText(LPDRAWITEMSTRUCT drawItem,
     if (Font == NULL)
     {
         DPRINT1("PaintText: CreateFont failed\n");
     if (Font == NULL)
     {
         DPRINT1("PaintText: CreateFont failed\n");
+        DeleteObject(hBrush);
         return FALSE;
     }
 
         return FALSE;
     }
 
@@ -147,6 +148,7 @@ PaintText(LPDRAWITEMSTRUCT drawItem,
     if (OldFont == NULL)
     {
         DeleteObject(Font);
     if (OldFont == NULL)
     {
         DeleteObject(Font);
+        DeleteObject(hBrush);
         return FALSE;
     }
 
         return FALSE;
     }