Vincent Povirk : gdiplus: Fix cleanup after errors in GdipCloneImage.
Alexandre Julliard
julliard at winehq.org
Mon Dec 7 10:26:16 CST 2009
Module: wine
Branch: master
Commit: 8b154a590edc9e773521e94e4f4176cf258b3ff5
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8b154a590edc9e773521e94e4f4176cf258b3ff5
Author: Vincent Povirk <vincent at codeweavers.com>
Date: Sun Dec 6 20:07:40 2009 -0600
gdiplus: Fix cleanup after errors in GdipCloneImage.
---
dlls/gdiplus/image.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c
index 22895c7..73a6bd6 100644
--- a/dlls/gdiplus/image.c
+++ b/dlls/gdiplus/image.c
@@ -746,12 +746,14 @@ GpStatus WINGDIPAPI GdipCloneImage(GpImage *image, GpImage **cloneImage)
GdipBitmapUnlockBits((GpBitmap*)*cloneImage, &lockeddata_dst);
}
- GdipBitmapUnlockBits(bitmap, &lockeddata_src);
+ if (stat != Ok)
+ GdipDisposeImage(*cloneImage);
}
+ GdipBitmapUnlockBits(bitmap, &lockeddata_src);
+
if (stat != Ok)
{
- GdipDisposeImage(*cloneImage);
*cloneImage = NULL;
}
else memcpy(&(*cloneImage)->format, &image->format, sizeof(GUID));
More information about the wine-cvs
mailing list