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
This commit is contained in:
parent
5412ec6e3f
commit
856d8ddbb3
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user