hhctrl: Fix memory leak on error path in resolve_filename (scan-build).
This commit is contained in:
parent
2cabb3f79d
commit
7b69313bbb
1 changed files with 8 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
|
|
Loading…
Add table
Reference in a new issue