From bdd498291ddbf22cd11e91f631af142b979a9130 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 11 Oct 2022 16:21:30 -0400 Subject: [PATCH] ripd: Cleanup memory allocations on shutdown Signed-off-by: Donald Sharp (cherry picked from commit 3d1588d8ed537e3dbf120e1b2a5ad5b3c00c7897) --- ripd/ripd.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ripd/ripd.c b/ripd/ripd.c index cc21c0bd69..68d9943ad4 100644 --- a/ripd/ripd.c +++ b/ripd/ripd.c @@ -3552,10 +3552,18 @@ static int rip_vrf_new(struct vrf *vrf) static int rip_vrf_delete(struct vrf *vrf) { + struct rip *rip; + if (IS_RIP_DEBUG_EVENT) zlog_debug("%s: VRF deleted: %s(%u)", __func__, vrf->name, vrf->vrf_id); + rip = rip_lookup_by_vrf_name(vrf->name); + if (!rip) + return 0; + + rip_clean(rip); + return 0; } -- 2.39.5