summaryrefslogtreecommitdiff
path: root/openbsd-compat
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd-compat')
-rw-r--r--openbsd-compat/glob.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/openbsd-compat/glob.c b/openbsd-compat/glob.c
index 7409b96e1..413dfc8cb 100644
--- a/openbsd-compat/glob.c
+++ b/openbsd-compat/glob.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: glob.c,v 1.44 2015/09/14 16:09:13 tedu Exp $ */ 1/* $OpenBSD: glob.c,v 1.46 2015/12/28 22:08:18 mmcc Exp $ */
2/* 2/*
3 * Copyright (c) 1989, 1993 3 * Copyright (c) 1989, 1993
4 * The Regents of the University of California. All rights reserved. 4 * The Regents of the University of California. All rights reserved.
@@ -820,14 +820,10 @@ globextend(const Char *path, glob_t *pglob, struct glob_lim *limitp,
820 pglob->gl_pathv && pglob->gl_pathv[i]) 820 pglob->gl_pathv && pglob->gl_pathv[i])
821 free(pglob->gl_statv[i]); 821 free(pglob->gl_statv[i]);
822 } 822 }
823 if (pglob->gl_pathv) { 823 free(pglob->gl_pathv);
824 free(pglob->gl_pathv); 824 pglob->gl_pathv = NULL;
825 pglob->gl_pathv = NULL; 825 free(pglob->gl_statv);
826 } 826 pglob->gl_statv = NULL;
827 if (pglob->gl_statv) {
828 free(pglob->gl_statv);
829 pglob->gl_statv = NULL;
830 }
831 return(GLOB_NOSPACE); 827 return(GLOB_NOSPACE);
832 } 828 }
833 829