]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_aspath.c
bgpd: Check for NULL inside aspath_unintern()
[mirror_frr.git] / bgpd / bgp_aspath.c
index 192cd6ca82fc14ca02bce215b70e7686b99c3612..dd27c9f6a12ff0683eadceb32861008266d74962 100644 (file)
@@ -328,7 +328,12 @@ void aspath_free(struct aspath *aspath)
 void aspath_unintern(struct aspath **aspath)
 {
        struct aspath *ret;
-       struct aspath *asp = *aspath;
+       struct aspath *asp;
+
+       if (!*aspath)
+               return;
+
+       asp = *aspath;
 
        if (asp->refcnt)
                asp->refcnt--;