]> git.puffer.fish Git - matthieu/frr.git/commitdiff
rfapi: free useless attr
authorPhilippe Guibert <philippe.guibert@6wind.com>
Mon, 30 Jan 2023 11:02:15 +0000 (12:02 +0100)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Fri, 24 Feb 2023 07:16:27 +0000 (08:16 +0100)
The attr pointer has been interned during the process of the
function, but has to be uninterned at the end.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
bgpd/rfapi/vnc_import_bgp.c

index 7c8e8f35c9e2c000a2662cff5719f998c7736a94..19ac6f353d89af66a2159d8c74b696f0730a187f 100644 (file)
@@ -834,6 +834,8 @@ static void vnc_import_bgp_add_route_mode_plain(struct bgp *bgp,
 
        if (ecom)
                ecommunity_free(&ecom);
+       if (iattr)
+               bgp_attr_unintern(&iattr);
 }
 
 static void vnc_import_bgp_add_route_mode_nvegroup(
@@ -1030,6 +1032,8 @@ static void vnc_import_bgp_add_route_mode_nvegroup(
 
        if (ecom)
                ecommunity_free(&ecom);
+       if (iattr)
+               bgp_attr_unintern(&iattr);
 }
 
 static void vnc_import_bgp_del_route_mode_plain(struct bgp *bgp,