about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2015-09-24 20:51:59 +0200
committerMikael Magnusson <mikachu@gmail.com>2015-09-24 20:52:56 +0200
commitbd5806aa0a98d8de6e1b6e7e4b7694b89952f08d (patch)
tree069a5323c6c049d70352c609cd33325f6f599553 /Src
parent4c935b9f85d25999a2ff9844274827f7905380f3 (diff)
downloadzsh-bd5806aa0a98d8de6e1b6e7e4b7694b89952f08d.tar.gz
zsh-bd5806aa0a98d8de6e1b6e7e4b7694b89952f08d.tar.xz
zsh-bd5806aa0a98d8de6e1b6e7e4b7694b89952f08d.zip
36603: glob: fix dirfd leak during Y shortcut qualifier
Diffstat (limited to 'Src')
-rw-r--r--Src/glob.c4
1 files changed, 3 insertions, 1 deletions
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;
+		    }
 		}
 	    }
 	}