From bd5806aa0a98d8de6e1b6e7e4b7694b89952f08d Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Thu, 24 Sep 2015 20:51:59 +0200 Subject: 36603: glob: fix dirfd leak during Y shortcut qualifier --- Src/glob.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Src/glob.c') diff --git a/Src/glob.c b/Src/glob.c index 43d135b99..fa3ce25f4 100644 --- a/Src/glob.c +++ b/Src/glob.c @@ -634,8 +634,10 @@ scanner(Complist q, int shortcircuit) } else { /* if the last filename component, just add it */ insert(fn, 1); - if (shortcircuit && shortcircuit == matchct) + if (shortcircuit && shortcircuit == matchct) { + closedir(lock); return; + } } } } -- cgit 1.4.1