lib: remove null check before free nh_labels

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
Quentin Young 2020-03-18 12:02:19 -04:00
parent ce1234aa0b
commit fe86c6b3b1

View File

@ -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;
}
}
const char *nexthop2str(const struct nexthop *nexthop, char *str, int size)