mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-04 04:33:18 +00:00
Merge pull request #6035 from qlyoung/fix-nexthop-label-nullity-before-free
lib: remove null check before free nh_labels
This commit is contained in:
commit
aa50bf0618
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user