Fix memory leaks

svn path=/trunk/; revision=53923
This commit is contained in:
Pierre Schweitzer 2011-10-02 12:22:39 +00:00
parent bbb7e15b76
commit 30b66be3ad

View file

@ -335,6 +335,8 @@ ShowCreateShortcutWizard(HWND hwndCPl, LPWSTR szPath)
nLength = wcslen(szPath);
if (!nLength)
{
HeapFree(GetProcessHeap(), 0, pContext);
/* no directory given */
return FALSE;
}
@ -342,6 +344,8 @@ ShowCreateShortcutWizard(HWND hwndCPl, LPWSTR szPath)
attrs = GetFileAttributesW(szPath);
if (attrs == INVALID_FILE_ATTRIBUTES)
{
HeapFree(GetProcessHeap(), 0, pContext);
/* invalid path */
return FALSE;
}