summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ospf6d/ospf6_snmp.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ospf6d/ospf6_snmp.c b/ospf6d/ospf6_snmp.c
index 1836dc2068..51a3bff2a3 100644
--- a/ospf6d/ospf6_snmp.c
+++ b/ospf6d/ospf6_snmp.c
@@ -963,8 +963,6 @@ static uint8_t *ospfv3WwLsdbEntry(struct variable *v, oid *name, size_t *length,
else if (v->magic & OSPFv3WWLINKTABLE) {
/* We build a sorted list of interfaces */
ifslist = list_new();
- if (!ifslist)
- return NULL;
ifslist->cmp = (int (*)(void *, void *))if_icmp_func;
FOR_ALL_INTERFACES (vrf, iif)
listnode_add_sort(ifslist, iif);
@@ -993,6 +991,7 @@ static uint8_t *ospfv3WwLsdbEntry(struct variable *v, oid *name, size_t *length,
}
list_delete_all_node(ifslist);
+ list_delete(&ifslist);
}
}
@@ -1100,8 +1099,6 @@ static uint8_t *ospfv3IfEntry(struct variable *v, oid *name, size_t *length,
} else {
/* We build a sorted list of interfaces */
ifslist = list_new();
- if (!ifslist)
- return NULL;
ifslist->cmp = (int (*)(void *, void *))if_icmp_func;
FOR_ALL_INTERFACES (vrf, iif)
listnode_add_sort(ifslist, iif);
@@ -1121,6 +1118,7 @@ static uint8_t *ospfv3IfEntry(struct variable *v, oid *name, size_t *length,
}
list_delete_all_node(ifslist);
+ list_delete(&ifslist);
}
if (!oi)