Commit b907b7d6 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

shell32: Fix a parent PIDL leak (Valgrind).

parent 33389354
...@@ -229,6 +229,7 @@ static void InitializeTreeView( browse_info *info ) ...@@ -229,6 +229,7 @@ static void InitializeTreeView( browse_info *info )
if (FAILED(hr)) { if (FAILED(hr)) {
WARN("SHGetDesktopFolder failed! hr = %08x\n", hr); WARN("SHGetDesktopFolder failed! hr = %08x\n", hr);
ILFree(pidlChild); ILFree(pidlChild);
ILFree(pidlParent);
return; return;
} }
hr = IShellFolder_BindToObject(lpsfDesktop, pidlParent, 0, &IID_IShellFolder, (LPVOID*)&lpsfParent); hr = IShellFolder_BindToObject(lpsfDesktop, pidlParent, 0, &IID_IShellFolder, (LPVOID*)&lpsfParent);
...@@ -238,6 +239,7 @@ static void InitializeTreeView( browse_info *info ) ...@@ -238,6 +239,7 @@ static void InitializeTreeView( browse_info *info )
if (FAILED(hr)) { if (FAILED(hr)) {
WARN("Could not bind to parent shell folder! hr = %08x\n", hr); WARN("Could not bind to parent shell folder! hr = %08x\n", hr);
ILFree(pidlChild); ILFree(pidlChild);
ILFree(pidlParent);
return; return;
} }
...@@ -252,6 +254,7 @@ static void InitializeTreeView( browse_info *info ) ...@@ -252,6 +254,7 @@ static void InitializeTreeView( browse_info *info )
WARN("Could not bind to root shell folder! hr = %08x\n", hr); WARN("Could not bind to root shell folder! hr = %08x\n", hr);
IShellFolder_Release(lpsfParent); IShellFolder_Release(lpsfParent);
ILFree(pidlChild); ILFree(pidlChild);
ILFree(pidlParent);
return; return;
} }
...@@ -262,6 +265,7 @@ static void InitializeTreeView( browse_info *info ) ...@@ -262,6 +265,7 @@ static void InitializeTreeView( browse_info *info )
IShellFolder_Release(lpsfParent); IShellFolder_Release(lpsfParent);
IShellFolder_Release(lpsfRoot); IShellFolder_Release(lpsfRoot);
ILFree(pidlChild); ILFree(pidlChild);
ILFree(pidlParent);
return; return;
} }
...@@ -271,6 +275,7 @@ static void InitializeTreeView( browse_info *info ) ...@@ -271,6 +275,7 @@ static void InitializeTreeView( browse_info *info )
SendMessageW( info->hwndTreeView, TVM_EXPAND, TVE_EXPAND, (LPARAM)item ); SendMessageW( info->hwndTreeView, TVM_EXPAND, TVE_EXPAND, (LPARAM)item );
ILFree(pidlChild); ILFree(pidlChild);
ILFree(pidlParent);
IShellFolder_Release(lpsfRoot); IShellFolder_Release(lpsfRoot);
IShellFolder_Release(lpsfParent); IShellFolder_Release(lpsfParent);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment