Lei Zhang : gdiplus: Free memory on a failure.
Alexandre Julliard
julliard at winehq.org
Tue Sep 30 11:16:32 CDT 2008
Module: wine
Branch: master
Commit: fc753bbb5886443ab0126bc883fd231926d49b2f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fc753bbb5886443ab0126bc883fd231926d49b2f
Author: Lei Zhang <thestig at google.com>
Date: Sun Sep 28 12:17:26 2008 -0700
gdiplus: Free memory on a failure.
---
dlls/gdiplus/brush.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c
index efa370f..8bf09ef 100644
--- a/dlls/gdiplus/brush.c
+++ b/dlls/gdiplus/brush.c
@@ -586,7 +586,11 @@ GpStatus WINGDIPAPI GdipCreateTextureIA(GpImage *image,
abs(stride));
*texture = GdipAlloc(sizeof(GpTexture));
- if (!*texture) return OutOfMemory;
+ if (!*texture){
+ GdipFree(dibits);
+ GdipFree(buff);
+ return OutOfMemory;
+ }
if((status = GdipCreateMatrix(&(*texture)->transform)) != Ok){
GdipFree(*texture);
More information about the wine-cvs
mailing list