[openssh-commits] [openssh] 04/08: upstream commit

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Nov 15 16:09:09 AEDT 2019


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit a16f748690139b9f452485d97511ad5e578f59b2
Author: Damien Miller <djm at mindrot.org>
Date:   Fri Nov 15 16:02:43 2019 +1100

    upstream commit
    
    revision 1.44
    date: 2015/09/14 16:09:13;  author: tedu;  state: Exp;  lines: +3 -5;  commitid: iWfSX2BIn0sLw62l;
    remove null check before free. from Michael McConville
    ok semarie
---
 openbsd-compat/glob.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/openbsd-compat/glob.c b/openbsd-compat/glob.c
index d4e052fa..7409b96e 100644
--- a/openbsd-compat/glob.c
+++ b/openbsd-compat/glob.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: glob.c,v 1.43 2015/06/13 16:57:04 deraadt Exp $ */
+/*	$OpenBSD: glob.c,v 1.44 2015/09/14 16:09:13 tedu Exp $ */
 /*
  * Copyright (c) 1989, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -968,15 +968,13 @@ globfree(glob_t *pglob)
 	if (pglob->gl_pathv != NULL) {
 		pp = pglob->gl_pathv + pglob->gl_offs;
 		for (i = pglob->gl_pathc; i--; ++pp)
-			if (*pp)
-				free(*pp);
+			free(*pp);
 		free(pglob->gl_pathv);
 		pglob->gl_pathv = NULL;
 	}
 	if (pglob->gl_statv != NULL) {
 		for (i = 0; i < pglob->gl_pathc; i++) {
-			if (pglob->gl_statv[i] != NULL)
-				free(pglob->gl_statv[i]);
+			free(pglob->gl_statv[i]);
 		}
 		free(pglob->gl_statv);
 		pglob->gl_statv = NULL;

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list