svn commit: r331230 - head/contrib/blacklist/bin
Conrad Meyer
cem at FreeBSD.org
Tue Mar 20 00:16:25 UTC 2018
Author: cem
Date: Tue Mar 20 00:16:24 2018
New Revision: 331230
URL: https://svnweb.freebsd.org/changeset/base/331230
Log:
blacklist: Fix minor memory leak in configuration parsing error case
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.
Reported by: Coverity
Sponsored by: Dell EMC Isilon
Modified:
head/contrib/blacklist/bin/conf.c
Modified: head/contrib/blacklist/bin/conf.c
==============================================================================
--- head/contrib/blacklist/bin/conf.c Tue Mar 20 00:03:49 2018 (r331229)
+++ head/contrib/blacklist/bin/conf.c Tue Mar 20 00:16:24 2018 (r331230)
@@ -1119,6 +1119,7 @@ conf_parse(const char *f)
confset_free(&lc);
confset_free(&rc);
fclose(fp);
+ free(line);
return;
}
}
More information about the svn-src-all
mailing list