]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_aspath.c
*: Add a hash_clean_and_free() function
[mirror_frr.git] / bgpd / bgp_aspath.c
index 55be70c3ffefe070d1bbcf2c0ab1e4cd8df56fb1..2c0de43c9b3f8b54ba9915e4656d9f80ecdb6b89 100644 (file)
@@ -2095,9 +2095,7 @@ void aspath_init(void)
 
 void aspath_finish(void)
 {
-       hash_clean(ashash, (void (*)(void *))aspath_free);
-       hash_free(ashash);
-       ashash = NULL;
+       hash_clean_and_free(&ashash, (void (*)(void *))aspath_free);
 
        if (snmp_stream)
                stream_free(snmp_stream);