Commit 481864d5 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

shell32: Fix some memory leaks.

parent 9b1082ef
......@@ -404,6 +404,7 @@ static BOOL StartLinkProcessor( LPCOLESTR szLink )
LPWSTR buffer;
STARTUPINFOW si;
PROCESS_INFORMATION pi;
BOOL ret;
len = sizeof(szFormat) + lstrlenW( szLink ) * sizeof(WCHAR);
buffer = HeapAlloc( GetProcessHeap(), 0, len );
......@@ -416,11 +417,18 @@ static BOOL StartLinkProcessor( LPCOLESTR szLink )
memset(&si, 0, sizeof(si));
si.cb = sizeof(si);
if (!CreateProcessW( NULL, buffer, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) return FALSE;
CloseHandle( pi.hProcess );
CloseHandle( pi.hThread );
return TRUE;
ret = CreateProcessW( NULL, buffer, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi );
HeapFree( GetProcessHeap(), 0, buffer );
if (ret)
{
CloseHandle( pi.hProcess );
CloseHandle( pi.hThread );
}
return ret;
}
static HRESULT WINAPI IPersistFile_fnSave(IPersistFile* iface, LPCOLESTR pszFileName, BOOL fRemember)
......
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