summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_advertise.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2019-02-25 21:18:13 +0100
committerQuentin Young <qlyoung@cumulusnetworks.com>2019-02-26 00:00:46 +0100
commit0a22ddfbb16a61c3e068ea1164e885104366112a (patch)
tree5aeaef43b3de5ebbdfcf1015421eb48b51a071fb /bgpd/bgp_advertise.c
parentlib: STAILQ_FOREACH_SAFE never gives a null elem (diff)
downloadfrr-0a22ddfbb16a61c3e068ea1164e885104366112a.tar.xz
frr-0a22ddfbb16a61c3e068ea1164e885104366112a.zip
*: remove null check before XFREE
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_advertise.c')
-rw-r--r--bgpd/bgp_advertise.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/bgpd/bgp_advertise.c b/bgpd/bgp_advertise.c
index 208a2947e..93094b76d 100644
--- a/bgpd/bgp_advertise.c
+++ b/bgpd/bgp_advertise.c
@@ -255,8 +255,7 @@ void bgp_sync_delete(struct peer *peer)
safi_t safi;
FOREACH_AFI_SAFI (afi, safi) {
- if (peer->sync[afi][safi])
- XFREE(MTYPE_BGP_SYNCHRONISE, peer->sync[afi][safi]);
+ XFREE(MTYPE_BGP_SYNCHRONISE, peer->sync[afi][safi]);
peer->sync[afi][safi] = NULL;
}
}