Module Name: src
Committed By: christos
Date: Wed Nov 6 21:01:18 UTC 2019
Modified Files:
src/external/bsd/blacklist/bin: conf.c
Log Message:
Ordinarily, the continue clause of the for-loop would free 'line.' In this
case we instead return early, missing the free. Add an explicit free to
avoid the leak. Found via coverity.
>From Conrad Meyer @ FreeBSD r331230
To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/external/bsd/blacklist/bin/conf.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/blacklist/bin/conf.c
diff -u src/external/bsd/blacklist/bin/conf.c:1.24 src/external/bsd/blacklist/bin/conf.c:1.25
--- src/external/bsd/blacklist/bin/conf.c:1.24 Mon Apr 4 11:52:56 2016
+++ src/external/bsd/blacklist/bin/conf.c Wed Nov 6 16:01:17 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: conf.c,v 1.24 2016/04/04 15:52:56 christos Exp $ */
+/* $NetBSD: conf.c,v 1.25 2019/11/06 21:01:17 christos Exp $ */
/*-
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: conf.c,v 1.24 2016/04/04 15:52:56 christos Exp $");
+__RCSID("$NetBSD: conf.c,v 1.25 2019/11/06 21:01:17 christos Exp $");
#include <stdio.h>
#ifdef HAVE_LIBUTIL_H
@@ -1119,6 +1119,7 @@ conf_parse(const char *f)
confset_free(&lc);
confset_free(&rc);
fclose(fp);
+ free(line);
return;
}
}