Nikolay Sivov : comctl32/imagelist: Fix a couple of imagelist leaks ( Valgrind).
Alexandre Julliard
julliard at winehq.org
Mon Jan 17 10:59:42 CST 2011
Module: wine
Branch: master
Commit: 6d1a3c6e6e1ca5448812c27eded3a604d6f28583
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6d1a3c6e6e1ca5448812c27eded3a604d6f28583
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Sat Jan 15 18:21:54 2011 +0300
comctl32/imagelist: Fix a couple of imagelist leaks (Valgrind).
---
dlls/comctl32/imagelist.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c
index ed92a52..66cd03d 100644
--- a/dlls/comctl32/imagelist.c
+++ b/dlls/comctl32/imagelist.c
@@ -3384,7 +3384,12 @@ static HRESULT WINAPI ImageListImpl_Merge(IImageList *iface, int i1,
/* Get the interface for the new image list */
if (hNew)
+ {
+ IImageList *imerge = (IImageList*)hNew;
+
ret = HIMAGELIST_QueryInterface(hNew, riid, ppv);
+ IImageList_Release(imerge);
+ }
IImageList_Release(iml2);
return ret;
@@ -3534,7 +3539,12 @@ static HRESULT WINAPI ImageListImpl_GetDragImage(IImageList *iface, POINT *ppt,
/* Get the interface for the new image list */
if (hNew)
+ {
+ IImageList *idrag = (IImageList*)hNew;
+
ret = HIMAGELIST_QueryInterface(hNew, riid, ppv);
+ IImageList_Release(idrag);
+ }
return ret;
}
More information about the wine-cvs
mailing list