summaryrefslogtreecommitdiff
path: root/compat.c
diff options
context:
space:
mode:
authordtucker@openbsd.org <dtucker@openbsd.org>2016-05-23 00:17:27 +0000
committerDarren Tucker <dtucker@zip.com.au>2016-06-06 11:25:37 +1000
commita0cb7778fbc9b43458f7072eb68dd858766384d1 (patch)
tree46d17385e92a77c5c309053991d89598014cb817 /compat.c
parentae9c0d4d5c581b3040d1f16b5c5f4b1cd1616743 (diff)
upstream commit
Plug mem leak in filter_proposal. ok djm@ Upstream-ID: bf968da7cfcea2a41902832e7d548356a4e2af34
Diffstat (limited to 'compat.c')
-rw-r--r--compat.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/compat.c b/compat.c
index 55838044c..53d1d9b05 100644
--- a/compat.c
+++ b/compat.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: compat.c,v 1.97 2015/08/19 23:21:42 djm Exp $ */ 1/* $OpenBSD: compat.c,v 1.98 2016/05/23 00:17:27 dtucker Exp $ */
2/* 2/*
3 * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved. 3 * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved.
4 * 4 *
@@ -252,7 +252,7 @@ proto_spec(const char *spec)
252 252
253/* 253/*
254 * Filters a proposal string, excluding any algorithm matching the 'filter' 254 * Filters a proposal string, excluding any algorithm matching the 'filter'
255 * pattern list. 255 * pattern list. Returns a new string and frees the original proposal.
256 */ 256 */
257static char * 257static char *
258filter_proposal(char *proposal, const char *filter) 258filter_proposal(char *proposal, const char *filter)
@@ -275,6 +275,7 @@ filter_proposal(char *proposal, const char *filter)
275 fix_prop = xstrdup((char *)buffer_ptr(&b)); 275 fix_prop = xstrdup((char *)buffer_ptr(&b));
276 buffer_free(&b); 276 buffer_free(&b);
277 free(orig_prop); 277 free(orig_prop);
278 free(proposal);
278 279
279 return fix_prop; 280 return fix_prop;
280} 281}