*: Remove tests for some XFREE-family functions

XFREE() covers that.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
This commit is contained in:
Donatas Abraitis 2020-03-11 18:16:23 +02:00
parent 7b26b14467
commit 8fa77bc6f4
3 changed files with 5 additions and 14 deletions

View File

@ -132,8 +132,7 @@ static void assegment_free(struct assegment *seg)
if (!seg)
return;
if (seg->as)
assegment_data_free(seg->as);
assegment_data_free(seg->as);
memset(seg, 0xfe, sizeof(struct assegment));
XFREE(MTYPE_AS_SEG, seg);

View File

@ -209,13 +209,8 @@ static void bgp_debug_list_free(struct list *list)
if (list)
for (ALL_LIST_ELEMENTS(list, node, nnode, filter)) {
listnode_delete(list, filter);
if (filter->p)
prefix_free(&filter->p);
if (filter->host)
XFREE(MTYPE_BGP_DEBUG_STR, filter->host);
prefix_free(&filter->p);
XFREE(MTYPE_BGP_DEBUG_STR, filter->host);
XFREE(MTYPE_BGP_DEBUG_FILTER, filter);
}
}

View File

@ -887,11 +887,8 @@ void connected_free(struct connected **connected)
{
struct connected *ptr = *connected;
if (ptr->address)
prefix_free(&ptr->address);
if (ptr->destination)
prefix_free(&ptr->destination);
prefix_free(&ptr->address);
prefix_free(&ptr->destination);
XFREE(MTYPE_CONNECTED_LABEL, ptr->label);