Nikolay Sivov : gdiplus: Simplify GdipResetImageAttributes(), fix remap table leak (Valgrind).

Alexandre Julliard julliard at winehq.org
Fri Apr 25 14:15:25 CDT 2014


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

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Fri Apr 25 13:50:04 2014 +0400

gdiplus: Simplify GdipResetImageAttributes(), fix remap table leak (Valgrind).

---

 dlls/gdiplus/imageattributes.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/dlls/gdiplus/imageattributes.c b/dlls/gdiplus/imageattributes.c
index 0b09547..17c525c 100644
--- a/dlls/gdiplus/imageattributes.c
+++ b/dlls/gdiplus/imageattributes.c
@@ -279,11 +279,10 @@ GpStatus WINGDIPAPI GdipResetImageAttributes(GpImageAttributes *imageAttr,
     if(!imageAttr || type >= ColorAdjustTypeCount)
         return InvalidParameter;
 
-    memset(&imageAttr->colorkeys[type], 0, sizeof(imageAttr->colorkeys[type]));
     memset(&imageAttr->colormatrices[type], 0, sizeof(imageAttr->colormatrices[type]));
-    memset(&imageAttr->colorremaptables[type], 0, sizeof(imageAttr->colorremaptables[type]));
-    memset(&imageAttr->gamma_enabled[type], 0, sizeof(imageAttr->gamma_enabled[type]));
-    memset(&imageAttr->gamma[type], 0, sizeof(imageAttr->gamma[type]));
+    GdipSetImageAttributesColorKeys(imageAttr, type, FALSE, 0, 0);
+    GdipSetImageAttributesRemapTable(imageAttr, type, FALSE, 0, NULL);
+    GdipSetImageAttributesGamma(imageAttr, type, FALSE, 0.0);
 
     return Ok;
 }




More information about the wine-cvs mailing list