From fd4c24f5e38bb686d86f0f7b3d8f48bcde7c67f7 Mon Sep 17 00:00:00 2001 From: Stephen Worley Date: Thu, 14 Nov 2019 17:16:56 -0500 Subject: [PATCH] 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 --- zebra/zebra_ns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }