From: Alex Henrie <alexhenrie24(a)gmail.com> --- dlls/hhctrl.ocx/hhctrl.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dlls/hhctrl.ocx/hhctrl.c b/dlls/hhctrl.ocx/hhctrl.c index 829c1c5305b..3de9a741422 100644 --- a/dlls/hhctrl.ocx/hhctrl.c +++ b/dlls/hhctrl.ocx/hhctrl.c @@ -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; } /****************************************************************** -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/3001