svn commit: r298329 - head/sys/net
Conrad E. Meyer
cem at FreeBSD.org
Wed Apr 20 02:01:46 UTC 2016
Author: cem
Date: Wed Apr 20 02:01:45 2016
New Revision: 298329
URL: https://svnweb.freebsd.org/changeset/base/298329
Log:
radix rn_inithead: Fix minor leak in low memory conditions
R_Zalloc is essentially a malloc(M_NOWAIT) wrapper. It is possible that 'rnh'
failed to allocate, but 'rmh' succeeds. In that case, we bail out of
rn_inithead() but previously did not free 'rmh'.
Introduced in r287073 (projects/routing) / MFP r294706.
Reported by: Coverity
CID: 1350258
Sponsored by: EMC / Isilon Storage Division
Modified:
head/sys/net/radix.c
Modified: head/sys/net/radix.c
==============================================================================
--- head/sys/net/radix.c Wed Apr 20 01:39:31 2016 (r298328)
+++ head/sys/net/radix.c Wed Apr 20 02:01:45 2016 (r298329)
@@ -1156,6 +1156,8 @@ rn_inithead(void **head, int off)
if (rnh == NULL || rmh == NULL) {
if (rnh != NULL)
R_Free(rnh);
+ if (rmh != NULL)
+ R_Free(rmh);
return (0);
}
More information about the svn-src-head
mailing list