dlls/shell32/pidl.c (take 2)
Ge van Geldorp
gvg at reactos.com
Mon Aug 15 06:37:23 CDT 2005
Changelog:
Ge van Geldorp <gvg at reactos.com>
- Fix resource leak on error paths
Index: dlls/shell32/pidl.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/pidl.c,v
retrieving revision 1.133
diff -u -r1.133 pidl.c
--- dlls/shell32/pidl.c 8 Jul 2005 14:18:32 -0000 1.133
+++ dlls/shell32/pidl.c 15 Aug 2005 11:35:38 -0000
@@ -1258,13 +1258,16 @@
dwAttributes = SFGAO_FILESYSTEM;
hr = IShellFolder_GetAttributesOf(psfFolder, 1, &pidlLast, &dwAttributes);
- if (FAILED(hr) || !(dwAttributes & SFGAO_FILESYSTEM)) return FALSE;
+ if (FAILED(hr) || !(dwAttributes & SFGAO_FILESYSTEM)) {
+ IShellFolder_Release(psfFolder);
+ return FALSE;
+ }
hr = IShellFolder_GetDisplayNameOf(psfFolder, pidlLast, SHGDN_FORPARSING, &strret);
+ IShellFolder_Release(psfFolder);
if (FAILED(hr)) return FALSE;
hr = StrRetToBufW(&strret, pidlLast, pszPath, MAX_PATH);
- IShellFolder_Release(psfFolder);
TRACE_(shell)("-- %s, 0x%08lx\n",debugstr_w(pszPath), hr);
return SUCCEEDED(hr);
More information about the wine-patches
mailing list