Nikolay Sivov : gdiplus: Fix uninitialized value jump and a leak in GdipAddPathPolygon test.

Alexandre Julliard julliard at winehq.org
Mon Jun 30 08:27:18 CDT 2008


Module: wine
Branch: master
Commit: db9172471b6eda3ee91bbe0bf49bccfa5478f892
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=db9172471b6eda3ee91bbe0bf49bccfa5478f892

Author: Nikolay Sivov <bunglehead at gmail.com>
Date:   Sat Jun 28 11:08:39 2008 +0400

gdiplus: Fix uninitialized value jump and a leak in GdipAddPathPolygon test.

---

 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[] = {




More information about the wine-cvs mailing list