mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
Fix ifa refcount leak during route addition.
Reported by: rstone
Reviewed by: rstone
(cherry picked from commit a375ec52a7)
This commit is contained in:
parent
f94e8beadb
commit
11304949de
1 changed files with 2 additions and 4 deletions
|
|
@ -594,14 +594,12 @@ create_rtentry(struct rib_head *rnh, struct rt_addrinfo *info,
|
|||
}
|
||||
|
||||
error = nhop_create_from_info(rnh, info, &nh);
|
||||
if (error != 0) {
|
||||
ifa_free(info->rti_ifa);
|
||||
ifa_free(info->rti_ifa);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
}
|
||||
|
||||
rt = uma_zalloc(V_rtzone, M_NOWAIT | M_ZERO);
|
||||
if (rt == NULL) {
|
||||
ifa_free(info->rti_ifa);
|
||||
nhop_free(nh);
|
||||
return (ENOBUFS);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue