[openssh-commits] [openssh] 02/06: upstream commit

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Feb 17 14:52:29 AEDT 2017


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

djm pushed a commit to branch master
in repository openssh.

commit b2afdaf1b52231aa23d2153f4a8c5a60a694dda4
Author: jsg at openbsd.org <jsg at openbsd.org>
Date:   Wed Feb 15 23:38:31 2017 +0000

    upstream commit
    
    Fix memory leaks in match_filter_list() error paths.
    
    ok dtucker@ markus@
    
    Upstream-ID: c7f96ac0877f6dc9188bbc908100a8d246cc7f0e
---
 match.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/match.c b/match.c
index aeba4bb..ca93cb0 100644
--- a/match.c
+++ b/match.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: match.c,v 1.34 2017/02/03 23:01:19 djm Exp $ */
+/* $OpenBSD: match.c,v 1.35 2017/02/15 23:38:31 jsg Exp $ */
 /*
  * Author: Tatu Ylonen <ylo at cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -297,8 +297,11 @@ match_filter_list(const char *proposal, const char *filter)
 	char *orig_prop = strdup(proposal);
 	char *cp, *tmp;
 
-	if (fix_prop == NULL || orig_prop == NULL)
+	if (fix_prop == NULL || orig_prop == NULL) {
+		free(orig_prop);
+		free(fix_prop);
 		return NULL;
+	}
 
 	tmp = orig_prop;
 	*fix_prop = '\0';

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


More information about the openssh-commits mailing list