]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ripngd: Cleanup memory allocations on shutdown
authorDonald Sharp <sharpd@nvidia.com>
Tue, 11 Oct 2022 20:21:44 +0000 (16:21 -0400)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Thu, 13 Oct 2022 05:09:26 +0000 (05:09 +0000)
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit b1d29673ca16e558aea5d632da181555c83980cf)

ripngd/ripngd.c

index e7d292869782042f547156c47bc87754216ba34a..a332daa94622c55bcf601adb291292a82f61b638 100644 (file)
@@ -2581,10 +2581,17 @@ static int ripng_vrf_new(struct vrf *vrf)
 
 static int ripng_vrf_delete(struct vrf *vrf)
 {
+       struct ripng *ripng;
+
        if (IS_RIPNG_DEBUG_EVENT)
                zlog_debug("%s: VRF deleted: %s(%u)", __func__, vrf->name,
                           vrf->vrf_id);
 
+       ripng = ripng_lookup_by_vrf_name(vrf->name);
+       if (!ripng)
+               return 0;
+
+       ripng_clean(ripng);
        return 0;
 }