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); } _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"