Nikolay Sivov : shell32: Fix a parent PIDL leak (Valgrind).

Alexandre Julliard julliard at winehq.org
Mon Jan 24 11:07:30 CST 2011


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

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Sat Jan 22 03:07:40 2011 +0300

shell32: Fix a parent PIDL leak (Valgrind).

---

 dlls/shell32/brsfolder.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/dlls/shell32/brsfolder.c b/dlls/shell32/brsfolder.c
index 705bdfa..9b0d20b 100644
--- a/dlls/shell32/brsfolder.c
+++ b/dlls/shell32/brsfolder.c
@@ -229,6 +229,7 @@ static void InitializeTreeView( browse_info *info )
         if (FAILED(hr)) {
             WARN("SHGetDesktopFolder failed! hr = %08x\n", hr);
             ILFree(pidlChild);
+            ILFree(pidlParent);
             return;
         }
         hr = IShellFolder_BindToObject(lpsfDesktop, pidlParent, 0, &IID_IShellFolder, (LPVOID*)&lpsfParent);
@@ -238,6 +239,7 @@ static void InitializeTreeView( browse_info *info )
     if (FAILED(hr)) {
         WARN("Could not bind to parent shell folder! hr = %08x\n", hr);
         ILFree(pidlChild);
+        ILFree(pidlParent);
         return;
     }
 
@@ -252,6 +254,7 @@ static void InitializeTreeView( browse_info *info )
         WARN("Could not bind to root shell folder! hr = %08x\n", hr);
         IShellFolder_Release(lpsfParent);
         ILFree(pidlChild);
+        ILFree(pidlParent);
         return;
     }
 
@@ -262,6 +265,7 @@ static void InitializeTreeView( browse_info *info )
         IShellFolder_Release(lpsfParent);
         IShellFolder_Release(lpsfRoot);
         ILFree(pidlChild);
+        ILFree(pidlParent);
         return;
     }
 
@@ -271,6 +275,7 @@ static void InitializeTreeView( browse_info *info )
     SendMessageW( info->hwndTreeView, TVM_EXPAND, TVE_EXPAND, (LPARAM)item );
 
     ILFree(pidlChild);
+    ILFree(pidlParent);
     IShellFolder_Release(lpsfRoot);
     IShellFolder_Release(lpsfParent);
 }




More information about the wine-cvs mailing list