Authors: Mike McCormack <mikem@codeweavers.com>, Jeremy White <jwhite@codeweavers.com>
Fixed memory leaks.

diff --git a/graphics/path.c b/graphics/path.c
index 522066d..befd345 100644
--- a/graphics/path.c
+++ b/graphics/path.c
@@ -1222,15 +1222,16 @@
    /* Create a region from the strokes */
    hrgn=CreatePolyPolygonRgn(pPath->pPoints, pNumPointsInStroke,
       numStrokes, nPolyFillMode);
+
+   /* Free memory for number-of-points-in-stroke array */
+   HeapFree( GetProcessHeap(), 0, pNumPointsInStroke );
+
    if(hrgn==(HRGN)0)
    {
       SetLastError(ERROR_NOT_ENOUGH_MEMORY);
       return FALSE;
    }
 
-   /* Free memory for number-of-points-in-stroke array */
-   HeapFree( GetProcessHeap(), 0, pNumPointsInStroke );
-
    /* Success! */
    *pHrgn=hrgn;
    return TRUE;