gdiplus: fix uninitialized value jump and a leak in GdipAddPathPolygon test

Nikolay Sivov bunglehead at gmail.com
Sat Jun 28 02:08:39 CDT 2008


Changelog:
    - Fix uninitialized jump and a leak (thanks D.Kegel with valgrind)

---
 dlls/gdiplus/tests/graphicspath.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/dlls/gdiplus/tests/graphicspath.c b/dlls/gdiplus/tests/graphicspath.c
index 9f65898..286cba6 100644
--- a/dlls/gdiplus/tests/graphicspath.c
+++ b/dlls/gdiplus/tests/graphicspath.c
@@ -602,6 +602,8 @@ static void test_polygon(void)
     points[4].X = 20.0;
     points[4].Y = 0.0;
 
+    GdipCreatePath(FillModeAlternate, &path);
+
     /* NULL args */
     status = GdipAddPathPolygon(NULL, points, 5);
     expect(InvalidParameter, status);
@@ -611,7 +613,6 @@ static void test_polygon(void)
     status = GdipAddPathPolygon(path, points, 2);
     expect(InvalidParameter, status);
 
-    GdipCreatePath(FillModeAlternate, &path);
     /* to test how it prolongs not empty path */
     status = GdipAddPathLine(path, 5.0, 5.0, 6.0, 8.0);
     expect(Ok, status);
@@ -619,6 +620,8 @@ static void test_polygon(void)
     expect(Ok, status);
     /* check resulting path */
     ok_path(path, poly_path, sizeof(poly_path)/sizeof(path_test_t), FALSE);
+
+    GdipDeletePath(path);
 }
 
 static path_test_t rect_path[] = {
-- 
1.4.4.4






More information about the wine-patches mailing list