summaryrefslogtreecommitdiffstats
path: root/bgpd/bgpd.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgpd.c')
-rw-r--r--bgpd/bgpd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index 54155290d..28f0b14d3 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -2436,14 +2436,14 @@ int peer_group_delete(struct peer_group *group)
peer_delete(other);
}
}
- list_delete(group->peer);
+ list_delete_and_null(&group->peer);
for (afi = AFI_IP; afi < AFI_MAX; afi++) {
for (ALL_LIST_ELEMENTS(group->listen_range[afi], node, nnode,
prefix)) {
prefix_free(prefix);
}
- list_delete(group->listen_range[afi]);
+ list_delete_and_null(&group->listen_range[afi]);
}
XFREE(MTYPE_PEER_GROUP_HOST, group->name);
@@ -3193,8 +3193,8 @@ void bgp_free(struct bgp *bgp)
QOBJ_UNREG(bgp);
- list_delete(bgp->group);
- list_delete(bgp->peer);
+ list_delete_and_null(&bgp->group);
+ list_delete_and_null(&bgp->peer);
if (bgp->peerhash) {
hash_free(bgp->peerhash);