summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2020-03-18 17:02:19 +0100
committerQuentin Young <qlyoung@cumulusnetworks.com>2020-03-18 17:02:19 +0100
commitfe86c6b3b15c9972c8894b9f07b1a2e640271b3e (patch)
treebecc6a9b2d046bf45c27bda166e12b3ff0a14581 /lib
parentMerge pull request #6020 from donaldsharp/cbit_bs (diff)
downloadfrr-fe86c6b3b15c9972c8894b9f07b1a2e640271b3e.tar.xz
frr-fe86c6b3b15c9972c8894b9f07b1a2e640271b3e.zip
lib: remove null check before free nh_labels
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/nexthop.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/nexthop.c b/lib/nexthop.c
index e23f8b079..c3be0a71e 100644
--- a/lib/nexthop.c
+++ b/lib/nexthop.c
@@ -415,10 +415,8 @@ void nexthop_add_labels(struct nexthop *nexthop, enum lsp_types_t type,
/* Free label information of nexthop, if present. */
void nexthop_del_labels(struct nexthop *nexthop)
{
- if (nexthop->nh_label) {
- XFREE(MTYPE_NH_LABEL, nexthop->nh_label);
- nexthop->nh_label_type = ZEBRA_LSP_NONE;
- }
+ XFREE(MTYPE_NH_LABEL, nexthop->nh_label);
+ nexthop->nh_label_type = ZEBRA_LSP_NONE;
}
const char *nexthop2str(const struct nexthop *nexthop, char *str, int size)