mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 09:22:03 +00:00
pimd: Fix memory allocation error
When creating the pim_ifp, and we run out of memory there existed a chance that we would dereference the failed memory pointer. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
070b4959fa
commit
b8ca17c230
@ -205,6 +205,7 @@ struct pim_interface *pim_if_new(struct interface *ifp, int igmp, int pim)
|
|||||||
if (!pim_ifp->sec_addr_list) {
|
if (!pim_ifp->sec_addr_list) {
|
||||||
zlog_err("%s: failure: secondary addresslist",
|
zlog_err("%s: failure: secondary addresslist",
|
||||||
__PRETTY_FUNCTION__);
|
__PRETTY_FUNCTION__);
|
||||||
|
return if_list_clean(pim_ifp);
|
||||||
}
|
}
|
||||||
pim_ifp->sec_addr_list->del = (void (*)(void *))pim_sec_addr_free;
|
pim_ifp->sec_addr_list->del = (void (*)(void *))pim_sec_addr_free;
|
||||||
pim_ifp->sec_addr_list->cmp =
|
pim_ifp->sec_addr_list->cmp =
|
||||||
|
Loading…
Reference in New Issue
Block a user