diff options
author | 2016-05-23 00:17:27 +0000 | |
---|---|---|
committer | 2016-05-23 00:17:27 +0000 | |
commit | 9b021daaeea39b621ed04591c84ec3ddf58acf99 (patch) | |
tree | e787190a0b8b21fe9988f8a61e1d3fcd01f0288f | |
parent | Remove iruserok(_sa)? and __ivaliduser(sa)? (diff) | |
download | wireguard-openbsd-9b021daaeea39b621ed04591c84ec3ddf58acf99.tar.xz wireguard-openbsd-9b021daaeea39b621ed04591c84ec3ddf58acf99.zip |
Plug mem leak in filter_proposal. ok djm@
-rw-r--r-- | usr.bin/ssh/compat.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/ssh/compat.c b/usr.bin/ssh/compat.c index 8f09b8b46b8..c171a141021 100644 --- a/usr.bin/ssh/compat.c +++ b/usr.bin/ssh/compat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: compat.c,v 1.97 2015/08/19 23:21:42 djm Exp $ */ +/* $OpenBSD: compat.c,v 1.98 2016/05/23 00:17:27 dtucker Exp $ */ /* * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved. * @@ -250,7 +250,7 @@ proto_spec(const char *spec) /* * Filters a proposal string, excluding any algorithm matching the 'filter' - * pattern list. + * pattern list. Returns a new string and frees the original proposal. */ static char * filter_proposal(char *proposal, const char *filter) @@ -273,6 +273,7 @@ filter_proposal(char *proposal, const char *filter) fix_prop = xstrdup((char *)buffer_ptr(&b)); buffer_free(&b); free(orig_prop); + free(proposal); return fix_prop; } |