]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bfdd: On interface address delete we are leaking memory
authorDonald Sharp <sharpd@nvidia.com>
Sat, 14 Nov 2020 22:31:21 +0000 (17:31 -0500)
committerIgor Ryzhov <iryzhov@nfware.com>
Tue, 17 Nov 2020 18:07:59 +0000 (21:07 +0300)
The interface address delete callback from zebra was not
deleting the ifc that was created as per normal work methodologies

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bfdd/ptm_adapter.c

index 48e55bce37ba4ddaf8d5212d140691873783d200..b1bba2c59a4ca2e74c5e85733237ff9d620d9163 100644 (file)
@@ -795,7 +795,10 @@ static int bfdd_interface_address_update(ZAPI_CALLBACK_ARGS)
                                                              : "delete",
                           prefix2str(ifc->address, buf, sizeof(buf)));
 
-       bfdd_sessions_enable_address(ifc);
+       if (cmd == ZEBRA_INTERFACE_ADDRESS_ADD)
+               bfdd_sessions_enable_address(ifc);
+       else
+               connected_free(&ifc);
 
        return 0;
 }