mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-11-23 09:17:32 +08:00
upstream commit
Fix memory leaks in match_filter_list() error paths. ok dtucker@ markus@ Upstream-ID: c7f96ac0877f6dc9188bbc908100a8d246cc7f0e
This commit is contained in:
parent
6d5a41b38b
commit
b2afdaf1b5
7
match.c
7
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@cs.hut.fi>
|
||||
* Copyright (c) 1995 Tatu Ylonen <ylo@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';
|
||||
|
Loading…
Reference in New Issue
Block a user