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>
This commit is contained in:
Stephen Worley 2019-11-14 17:16:56 -05:00
parent 257b245cd1
commit fd4c24f5e3

View File

@ -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;
}