]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_advertise.c
lib: speedup test exit when startup fails
[mirror_frr.git] / bgpd / bgp_advertise.c
index 94413117c17dac92300cd7bf7de8a4216f93c53d..5b2cb579217251915b3470f2a419434308b4aca3 100644 (file)
@@ -71,7 +71,7 @@ unsigned int baa_hash_key(void *p)
        return attrhash_key_make(baa->attr);
 }
 
-int baa_hash_cmp(const void *p1, const void *p2)
+bool baa_hash_cmp(const void *p1, const void *p2)
 {
        const struct bgp_advertise_attr *baa1 = p1;
        const struct bgp_advertise_attr *baa2 = p2;
@@ -90,9 +90,9 @@ struct bgp_advertise *bgp_advertise_new(void)
 
 void bgp_advertise_free(struct bgp_advertise *adv)
 {
-       if (adv->binfo)
-               bgp_info_unlock(
-                       adv->binfo); /* bgp_advertise bgp_info reference */
+       if (adv->pathi)
+               /* bgp_advertise bgp_path_info reference */
+               bgp_path_info_unlock(adv->pathi);
        XFREE(MTYPE_BGP_ADVERTISE, adv);
 }