Andrew Eikum : gdiplus/tests: Fix resource leaks in several tests.

Alexandre Julliard julliard at winehq.org
Fri Jun 26 09:47:12 CDT 2009


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

Author: Andrew Eikum <andrew at brightnightgames.com>
Date:   Thu Jun 25 08:40:28 2009 -0500

gdiplus/tests: Fix resource leaks in several tests.

A few tests initialized two GpGraphics objects, and only released one.
These have been fixed by removing the redundant initialization.

---

 dlls/gdiplus/tests/graphics.c |   10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c
index 668d261..68c0e29 100644
--- a/dlls/gdiplus/tests/graphics.c
+++ b/dlls/gdiplus/tests/graphics.c
@@ -243,8 +243,6 @@ static void test_GdipDrawArc(void)
     HDC hdc = GetDC(0);
 
     /* make a graphics object and pen object */
-    status = GdipCreateFromHDC(hdc, &graphics);
-    expect(Ok, status);
     ok(hdc != NULL, "Expected HDC to be initialized\n");
 
     status = GdipCreateFromHDC(hdc, &graphics);
@@ -289,8 +287,6 @@ static void test_GdipDrawArcI(void)
     HDC hdc = GetDC(0);
 
     /* make a graphics object and pen object */
-    status = GdipCreateFromHDC(hdc, &graphics);
-    expect(Ok, status);
     ok(hdc != NULL, "Expected HDC to be initialized\n");
 
     status = GdipCreateFromHDC(hdc, &graphics);
@@ -335,8 +331,6 @@ static void test_GdipDrawBezierI(void)
     HDC hdc = GetDC(0);
 
     /* make a graphics object and pen object */
-    status = GdipCreateFromHDC(hdc, &graphics);
-    expect(Ok, status);
     ok(hdc != NULL, "Expected HDC to be initialized\n");
 
     status = GdipCreateFromHDC(hdc, &graphics);
@@ -436,8 +430,6 @@ static void test_GdipDrawLineI(void)
     HDC hdc = GetDC(0);
 
     /* make a graphics object and pen object */
-    status = GdipCreateFromHDC(hdc, &graphics);
-    expect(Ok, status);
     ok(hdc != NULL, "Expected HDC to be initialized\n");
 
     status = GdipCreateFromHDC(hdc, &graphics);
@@ -477,8 +469,6 @@ static void test_GdipDrawLinesI(void)
     HDC hdc = GetDC(0);
 
     /* make a graphics object and pen object */
-    status = GdipCreateFromHDC(hdc, &graphics);
-    expect(Ok, status);
     ok(hdc != NULL, "Expected HDC to be initialized\n");
 
     status = GdipCreateFromHDC(hdc, &graphics);




More information about the wine-cvs mailing list