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