summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zebra/zebra_nhg.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c
index 05da25b2b8..7fe66ff77f 100644
--- a/zebra/zebra_nhg.c
+++ b/zebra/zebra_nhg.c
@@ -1000,6 +1000,9 @@ static struct nhg_hash_entry *depends_find(struct nexthop *nh, afi_t afi)
struct nexthop *lookup = NULL;
struct nhg_hash_entry *nhe = NULL;
+ if (!nh)
+ goto done;
+
copy_nexthops(&lookup, nh, NULL);
/* Clear it, in case its a group */
@@ -1012,6 +1015,7 @@ static struct nhg_hash_entry *depends_find(struct nexthop *nh, afi_t afi)
nexthops_free(lookup);
+done:
return nhe;
}