summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Worley <sworley@cumulusnetworks.com>2019-11-14 17:16:56 -0500
committerStephen Worley <sworley@cumulusnetworks.com>2019-11-15 12:33:35 -0500
commitfd4c24f5e38bb686d86f0f7b3d8f48bcde7c67f7 (patch)
tree0985c4da48d5750340e6fee631f850b90011e990
parent257b245cd13e3d836093e8fb5c704d90ef978660 (diff)
zebra: XFREE ns->info directly to NULL it out
We should be setting the ns->info pointer to NULL when we free what it points to. Just use XFREE directly on the void * pointer to do this. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
-rw-r--r--zebra/zebra_ns.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/zebra/zebra_ns.c b/zebra/zebra_ns.c
index 4d971cc24f..3287176ef5 100644
--- a/zebra/zebra_ns.c
+++ b/zebra/zebra_ns.c
@@ -90,7 +90,7 @@ static int zebra_ns_delete(struct ns *ns)
zlog_info("ZNS %s with id %u (deleted)", ns->name, ns->ns_id);
if (!zns)
return 0;
- XFREE(MTYPE_ZEBRA_NS, zns);
+ XFREE(MTYPE_ZEBRA_NS, ns->info);
return 0;
}