summaryrefslogtreecommitdiff
path: root/zebra/zebra_ns.c
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2023-11-28 20:14:42 +0100
committerGitHub <noreply@github.com>2023-11-28 20:14:42 +0100
commitbb6fe6beb9dc5ca891e064576644be0fd160da15 (patch)
tree0243d6c552c5cf169c701ce10613698f15894dfe /zebra/zebra_ns.c
parenta526795144c88461e146f46529873243da2292e0 (diff)
parent71f7ecb571cd8a87c97ae952db1f1fafa7ef627a (diff)
Merge pull request #14811 from donaldsharp/zebra_final_shutdown_finally
Zebra final shutdown finally
Diffstat (limited to 'zebra/zebra_ns.c')
-rw-r--r--zebra/zebra_ns.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/zebra/zebra_ns.c b/zebra/zebra_ns.c
index ffdb9df531..f74b30a6ce 100644
--- a/zebra/zebra_ns.c
+++ b/zebra/zebra_ns.c
@@ -42,11 +42,6 @@ struct zebra_ns *zebra_ns_lookup(ns_id_t ns_id)
return (info == NULL) ? dzns : info;
}
-static struct zebra_ns *zebra_ns_alloc(void)
-{
- return XCALLOC(MTYPE_ZEBRA_NS, sizeof(struct zebra_ns));
-}
-
static int zebra_ns_new(struct ns *ns)
{
struct zebra_ns *zns;
@@ -57,7 +52,7 @@ static int zebra_ns_new(struct ns *ns)
if (IS_ZEBRA_DEBUG_EVENT)
zlog_info("ZNS %s with id %u (created)", ns->name, ns->ns_id);
- zns = zebra_ns_alloc();
+ zns = XCALLOC(MTYPE_ZEBRA_NS, sizeof(struct zebra_ns));
ns->info = zns;
zns->ns = ns;
zns->ns_id = ns->ns_id;
@@ -194,6 +189,8 @@ int zebra_ns_final_shutdown(struct ns *ns,
kernel_terminate(zns, true);
+ zebra_ns_delete(ns);
+
return NS_WALK_CONTINUE;
}