From 9c6c48bc101f8f4b47fa9f373e436c85d04608cf Mon Sep 17 00:00:00 2001 From: Stephen Worley Date: Sun, 24 May 2020 16:08:36 -0400 Subject: [PATCH] zebra: return the proto nhe on del even with refs Return the proto nhe on del even if their are still possible route references. We may get a del before the routes are removed. So we still need to return this to the caller so they can decrement the ref. Signed-off-by: Stephen Worley --- zebra/zebra_nhg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c index 483b911b31..b4d7df0b53 100644 --- a/zebra/zebra_nhg.c +++ b/zebra/zebra_nhg.c @@ -2838,7 +2838,7 @@ struct nhg_hash_entry *zebra_nhg_proto_del(uint32_t id) zlog_debug( "%s: id %u, still being used by routes refcnt %u", __func__, nhe->id, nhe->refcnt); - return NULL; + return nhe; } if (IS_ZEBRA_DEBUG_NHG_DETAIL)