mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-10 23:29:20 +00:00
Merge pull request #14579 from Keelan10/fix-nhrpd-leak
nhrpd: Fix nhrp_peer leak
This commit is contained in:
commit
ed262d0fb1
@ -70,6 +70,8 @@ static void nhrp_cache_free(struct nhrp_cache *c)
|
|||||||
notifier_call(&c->notifier_list, NOTIFY_CACHE_DELETE);
|
notifier_call(&c->notifier_list, NOTIFY_CACHE_DELETE);
|
||||||
assert(!notifier_active(&c->notifier_list));
|
assert(!notifier_active(&c->notifier_list));
|
||||||
hash_release(nifp->cache_hash, c);
|
hash_release(nifp->cache_hash, c);
|
||||||
|
if (c->cur.peer)
|
||||||
|
nhrp_peer_notify_del(c->cur.peer, &c->peer_notifier);
|
||||||
nhrp_peer_unref(c->cur.peer);
|
nhrp_peer_unref(c->cur.peer);
|
||||||
nhrp_peer_unref(c->new.peer);
|
nhrp_peer_unref(c->new.peer);
|
||||||
EVENT_OFF(c->t_timeout);
|
EVENT_OFF(c->t_timeout);
|
||||||
|
@ -88,8 +88,8 @@ static void nhrp_request_stop(void)
|
|||||||
nhrp_zebra_terminate();
|
nhrp_zebra_terminate();
|
||||||
vici_terminate();
|
vici_terminate();
|
||||||
evmgr_terminate();
|
evmgr_terminate();
|
||||||
nhrp_vc_terminate();
|
|
||||||
vrf_terminate();
|
vrf_terminate();
|
||||||
|
nhrp_vc_terminate();
|
||||||
|
|
||||||
debugf(NHRP_DEBUG_COMMON, "Done.");
|
debugf(NHRP_DEBUG_COMMON, "Done.");
|
||||||
frr_fini();
|
frr_fini();
|
||||||
|
@ -45,7 +45,8 @@ static void nhrp_peer_check_delete(struct nhrp_peer *p)
|
|||||||
|
|
||||||
EVENT_OFF(p->t_fallback);
|
EVENT_OFF(p->t_fallback);
|
||||||
EVENT_OFF(p->t_timer);
|
EVENT_OFF(p->t_timer);
|
||||||
hash_release(nifp->peer_hash, p);
|
if (nifp->peer_hash)
|
||||||
|
hash_release(nifp->peer_hash, p);
|
||||||
nhrp_interface_notify_del(p->ifp, &p->ifp_notifier);
|
nhrp_interface_notify_del(p->ifp, &p->ifp_notifier);
|
||||||
nhrp_vc_notify_del(p->vc, &p->vc_notifier);
|
nhrp_vc_notify_del(p->vc, &p->vc_notifier);
|
||||||
XFREE(MTYPE_NHRP_PEER, p);
|
XFREE(MTYPE_NHRP_PEER, p);
|
||||||
|
Loading…
Reference in New Issue
Block a user