summaryrefslogtreecommitdiffstats
path: root/lib/netns_linux.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2019-02-25 21:18:13 +0100
committerQuentin Young <qlyoung@cumulusnetworks.com>2019-02-26 00:00:46 +0100
commit0a22ddfbb16a61c3e068ea1164e885104366112a (patch)
tree5aeaef43b3de5ebbdfcf1015421eb48b51a071fb /lib/netns_linux.c
parentlib: STAILQ_FOREACH_SAFE never gives a null elem (diff)
downloadfrr-0a22ddfbb16a61c3e068ea1164e885104366112a.tar.xz
frr-0a22ddfbb16a61c3e068ea1164e885104366112a.zip
*: remove null check before XFREE
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/netns_linux.c')
-rw-r--r--lib/netns_linux.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/netns_linux.c b/lib/netns_linux.c
index ef2f5dc95..55c66fdc3 100644
--- a/lib/netns_linux.c
+++ b/lib/netns_linux.c
@@ -344,8 +344,7 @@ void ns_delete(struct ns *ns)
// if_terminate (&ns->iflist);
RB_REMOVE(ns_head, &ns_tree, ns);
- if (ns->name)
- XFREE(MTYPE_NS_NAME, ns->name);
+ XFREE(MTYPE_NS_NAME, ns->name);
XFREE(MTYPE_NS, ns);
}