1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

hhctrl: Fix memory leak on error path in resolve_filename (scan-build).

This commit is contained in:
Alex Henrie 2023-06-07 00:02:24 -06:00 committed by Alexandre Julliard
parent 2cabb3f79d
commit 7b69313bbb

View file

@ -148,7 +148,14 @@ static BOOL resolve_filename(const WCHAR *env_filename, WCHAR *fullname, DWORD b
free(filename);
return (GetFileAttributesW(fullname) != INVALID_FILE_ATTRIBUTES);
if (GetFileAttributesW(fullname) == INVALID_FILE_ATTRIBUTES)
{
if (window) free(*window);
if (index) free(*index);
return FALSE;
}
return TRUE;
}
/******************************************************************