Jason Edmeades : cmd: Fix handle leak in if exists.
Alexandre Julliard
julliard at winehq.org
Mon Jul 16 14:39:59 CDT 2018
Module: wine
Branch: master
Commit: f634fe15db1d6f09615505eb445b9e748720dbeb
URL: https://source.winehq.org/git/wine.git/?a=commit;h=f634fe15db1d6f09615505eb445b9e748720dbeb
Author: Jason Edmeades <us at edmeades.me.uk>
Date: Sun Jul 15 23:15:26 2018 +0100
cmd: Fix handle leak in if exists.
Fixes regression in f53d57c8549dc439eb73354bfd37acd1e4e86cfd.
Signed-off-by: Jason Edmeades <us at edmeades.me.uk>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
programs/cmd/builtins.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
index 57a41c4..ff58484 100644
--- a/programs/cmd/builtins.c
+++ b/programs/cmd/builtins.c
@@ -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);
}
More information about the wine-cvs
mailing list