cmd: Fix handle leak in if exists.
Fixes regression in f53d57c854
.
Signed-off-by: Jason Edmeades <us@edmeades.me.uk>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
55587efd3a
commit
f634fe15db
|
@ -2844,7 +2844,7 @@ void WCMD_if (WCHAR *p, CMD_LIST **cmdList)
|
||||||
WIN32_FIND_DATAW fd;
|
WIN32_FIND_DATAW fd;
|
||||||
HANDLE hff = FindFirstFileW(WCMD_parameter(p, 1+negate, NULL, FALSE, FALSE), &fd);
|
HANDLE hff = FindFirstFileW(WCMD_parameter(p, 1+negate, NULL, FALSE, FALSE), &fd);
|
||||||
test = (hff != INVALID_HANDLE_VALUE );
|
test = (hff != INVALID_HANDLE_VALUE );
|
||||||
if (!test) FindClose(hff);
|
if (test) FindClose(hff);
|
||||||
|
|
||||||
WCMD_parameter(p, 2+negate, &command, FALSE, FALSE);
|
WCMD_parameter(p, 2+negate, &command, FALSE, FALSE);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue