mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 07:48:07 +00:00
lib: Do not double-assign freed pointer to NULL
It's already done by XFREE. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
This commit is contained in:
parent
a454d9ab44
commit
aa6fe908f3
@ -79,7 +79,6 @@ void ls_node_del(struct ls_node *node)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
XFREE(MTYPE_LS_DB, node);
|
XFREE(MTYPE_LS_DB, node);
|
||||||
node = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int ls_node_same(struct ls_node *n1, struct ls_node *n2)
|
int ls_node_same(struct ls_node *n1, struct ls_node *n2)
|
||||||
@ -168,7 +167,6 @@ void ls_attributes_del(struct ls_attributes *attr)
|
|||||||
ls_attributes_srlg_del(attr);
|
ls_attributes_srlg_del(attr);
|
||||||
|
|
||||||
XFREE(MTYPE_LS_DB, attr);
|
XFREE(MTYPE_LS_DB, attr);
|
||||||
attr = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int ls_attributes_same(struct ls_attributes *l1, struct ls_attributes *l2)
|
int ls_attributes_same(struct ls_attributes *l1, struct ls_attributes *l2)
|
||||||
@ -221,7 +219,6 @@ void ls_prefix_del(struct ls_prefix *pref)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
XFREE(MTYPE_LS_DB, pref);
|
XFREE(MTYPE_LS_DB, pref);
|
||||||
pref = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int ls_prefix_same(struct ls_prefix *p1, struct ls_prefix *p2)
|
int ls_prefix_same(struct ls_prefix *p1, struct ls_prefix *p2)
|
||||||
@ -839,7 +836,6 @@ void ls_ted_del(struct ls_ted *ted)
|
|||||||
subnets_fini(&ted->subnets);
|
subnets_fini(&ted->subnets);
|
||||||
|
|
||||||
XFREE(MTYPE_LS_DB, ted);
|
XFREE(MTYPE_LS_DB, ted);
|
||||||
ted = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ls_ted_del_all(struct ls_ted *ted)
|
void ls_ted_del_all(struct ls_ted *ted)
|
||||||
|
Loading…
Reference in New Issue
Block a user