summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordtucker@openbsd.org <dtucker@openbsd.org>2017-03-10 03:24:48 +0000
committerDarren Tucker <dtucker@zip.com.au>2017-03-10 15:25:11 +1100
commitf6edbe9febff8121f26835996b1229b5064d31b7 (patch)
tree838b38a560cd94a391fef5deff7b9d769aec1621
parent566b3a46e89a2fda2db46f04f2639e92da64a120 (diff)
upstream commit
Plug mem leak on GLOB_NOMATCH case. From jjelen at redhat.com via bz#2687, ok djm@ Upstream-ID: 8016a7ae97719d3aa55fb723fc2ad3200058340d
-rw-r--r--readconf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/readconf.c b/readconf.c
index e51481b10..c62c2eaba 100644
--- a/readconf.c
+++ b/readconf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: readconf.c,v 1.268 2017/02/03 23:01:19 djm Exp $ */ 1/* $OpenBSD: readconf.c,v 1.269 2017/03/10 03:24:48 dtucker Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1500,6 +1500,7 @@ parse_keytypes:
1500 if (r == GLOB_NOMATCH) { 1500 if (r == GLOB_NOMATCH) {
1501 debug("%.200s line %d: include %s matched no " 1501 debug("%.200s line %d: include %s matched no "
1502 "files",filename, linenum, arg2); 1502 "files",filename, linenum, arg2);
1503 free(arg2);
1503 continue; 1504 continue;
1504 } else if (r != 0 || gl.gl_pathc < 0) 1505 } else if (r != 0 || gl.gl_pathc < 0)
1505 fatal("%.200s line %d: glob failed for %s.", 1506 fatal("%.200s line %d: glob failed for %s.",