svn commit: r298448 - head/contrib/bsnmp/snmpd
Garrett Cooper
ngie at FreeBSD.org
Fri Apr 22 05:14:13 UTC 2016
Author: ngie
Date: Fri Apr 22 05:14:12 2016
New Revision: 298448
URL: https://svnweb.freebsd.org/changeset/base/298448
Log:
Don't leak `string` in parse_define(..) when a macro has been found
and the parser token != TOK_ASSIGN
MFC after: 1 week
CID: 1007187, 1007188
Reported by: Coverity
Obtained from: Isilon OneFS (part of r445479)
Submitted by: Miles Ohlrich <miles.ohlrich at isilon.com>
Sponsored by: EMC / Isilon Storage Division
Modified:
head/contrib/bsnmp/snmpd/config.c
Modified: head/contrib/bsnmp/snmpd/config.c
==============================================================================
--- head/contrib/bsnmp/snmpd/config.c Fri Apr 22 05:07:59 2016 (r298447)
+++ head/contrib/bsnmp/snmpd/config.c Fri Apr 22 05:14:12 2016 (r298448)
@@ -1150,7 +1150,8 @@ parse_define(const char *varname)
free(m->value);
m->value = string;
m->length = length;
- }
+ } else
+ free(string);
}
token = TOK_EOL;
More information about the svn-src-all
mailing list