2005-05-19 Paul Jakma <paul@dishone.st>
* bgp_fsm.c: (bgp_stop) use sockunion_free, not XFREE..
* bgp_network.c: (bgp_getsockname) ditto
* bgp_routemap.c: (route_match_peer) ditto, als use a ret value and
remove one sockunion_free.
* bgpd.c: (peer_delete) ditto
diff --git a/bgpd/ChangeLog b/bgpd/ChangeLog
index 3149f68..02ca213 100644
--- a/bgpd/ChangeLog
+++ b/bgpd/ChangeLog
@@ -1,3 +1,11 @@
+2005-05-19 Paul Jakma <paul@dishone.st>
+
+ * bgp_fsm.c: (bgp_stop) use sockunion_free, not XFREE..
+ * bgp_network.c: (bgp_getsockname) ditto
+ * bgp_routemap.c: (route_match_peer) ditto, als use a ret value and
+ remove one sockunion_free.
+ * bgpd.c: (peer_delete) ditto
+
2005-04-11 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* bgp_zebra.c (bgp_redistribute_set, bgp_redistribute_unset):
diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c
index c8ca417..6368ff4 100644
--- a/bgpd/bgp_fsm.c
+++ b/bgpd/bgp_fsm.c
@@ -491,13 +491,13 @@
/* Connection information. */
if (peer->su_local)
{
- XFREE (MTYPE_SOCKUNION, peer->su_local);
+ sockunion_free (peer->su_local);
peer->su_local = NULL;
}
if (peer->su_remote)
{
- XFREE (MTYPE_SOCKUNION, peer->su_remote);
+ sockunion_free (peer->su_remote);
peer->su_remote = NULL;
}
diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c
index e304868..b2708e7 100644
--- a/bgpd/bgp_network.c
+++ b/bgpd/bgp_network.c
@@ -263,13 +263,13 @@
{
if (peer->su_local)
{
- XFREE (MTYPE_TMP, peer->su_local);
+ sockunion_free (peer->su_local);
peer->su_local = NULL;
}
if (peer->su_remote)
{
- XFREE (MTYPE_TMP, peer->su_remote);
+ sockunion_free (peer->su_remote);
peer->su_remote = NULL;
}
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c
index 060c68c..a9de457 100644
--- a/bgpd/bgp_routemap.c
+++ b/bgpd/bgp_routemap.c
@@ -124,19 +124,19 @@
su2 = sockunion_str2su ("0.0.0.0");
if ( sockunion_same (su, su2) )
{
+ int ret;
if ( CHECK_FLAG (peer->rmap_type, PEER_RMAP_TYPE_NETWORK) ||
CHECK_FLAG (peer->rmap_type, PEER_RMAP_TYPE_REDISTRIBUTE) ||
CHECK_FLAG (peer->rmap_type, PEER_RMAP_TYPE_DEFAULT))
- {
- XFREE (MTYPE_SOCKUNION, su2);
-
- return RMAP_MATCH;
- }
+ ret = RMAP_MATCH;
else
- return RMAP_NOMATCH;
+ ret = RMAP_NOMATCH;
+
+ sockunion_free (su2);
+ return ret;
}
- XFREE (MTYPE_SOCKUNION, su2);
-
+ sockunion_free (su2);
+
if (! CHECK_FLAG (peer->sflags, PEER_STATUS_GROUP))
{
if (sockunion_same (su, &peer->su))
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index 0d1689a..87e6b44 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -1140,9 +1140,9 @@
/* Local and remote addresses. */
if (peer->su_local)
- XFREE (MTYPE_TMP, peer->su_local);
+ sockunion_free (peer->su_local);
if (peer->su_remote)
- XFREE (MTYPE_TMP, peer->su_remote);
+ sockunion_free (peer->su_remote);
/* Peer description string. */
if (peer->desc)