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>
oldstable
Jason Edmeades 2018-07-15 23:15:26 +01:00 committed by Alexandre Julliard
parent 55587efd3a
commit f634fe15db
1 changed files with 1 additions and 1 deletions

View File

@ -2844,7 +2844,7 @@ void WCMD_if (WCHAR *p, CMD_LIST **cmdList)
WIN32_FIND_DATAW fd;
HANDLE hff = FindFirstFileW(WCMD_parameter(p, 1+negate, NULL, FALSE, FALSE), &fd);
test = (hff != INVALID_HANDLE_VALUE );
if (!test) FindClose(hff);
if (test) FindClose(hff);
WCMD_parameter(p, 2+negate, &command, FALSE, FALSE);
}