summaryrefslogtreecommitdiff
path: root/bgpd
diff options
context:
space:
mode:
authorPaul Jakma <paul.jakma@sun.com>2006-08-27 06:57:47 +0000
committerPaul Jakma <paul.jakma@sun.com>2006-08-27 06:57:47 +0000
commit9f906c7c562bd62043c77a79d84967deea9fe45e (patch)
tree84fc5f54c9effcb75ec8ea139228b5f0384075f1 /bgpd
parent3414bf250a385496fa6c11dbaa9a5f79100d7a48 (diff)
[bgpd] fix mtype in XFREE and NULL out freed pointer
2006-08-27 Paul Jakma <paul.jakma@sun.com> * bgp_advertise.c: (bgp_sync_delete) fix mtype in XFREE. NULL out peer->hash after free, to be sure.
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/ChangeLog5
-rw-r--r--bgpd/bgp_advertise.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/bgpd/ChangeLog b/bgpd/ChangeLog
index 99960aef..b27132c9 100644
--- a/bgpd/ChangeLog
+++ b/bgpd/ChangeLog
@@ -1,3 +1,8 @@
+2006-08-27 Paul Jakma <paul.jakma@sun.com>
+
+ * bgp_advertise.c: (bgp_sync_delete) fix mtype in XFREE.
+ NULL out peer->hash after free, to be sure.
+
2006-08-06 Paul Jakma <paul.jakma@sun.com>
* bgp_aspath.c: (aspath_loop_check) Fix the typo-bug which
diff --git a/bgpd/bgp_advertise.c b/bgpd/bgp_advertise.c
index 3a49ca85..3a40b1a7 100644
--- a/bgpd/bgp_advertise.c
+++ b/bgpd/bgp_advertise.c
@@ -403,10 +403,11 @@ bgp_sync_delete (struct peer *peer)
for (safi = SAFI_UNICAST; safi < SAFI_MAX; safi++)
{
if (peer->sync[afi][safi])
- XFREE (MTYPE_TMP, peer->sync[afi][safi]);
+ XFREE (MTYPE_BGP_SYNCHRONISE, peer->sync[afi][safi]);
peer->sync[afi][safi] = NULL;
if (peer->hash[afi][safi])
hash_free (peer->hash[afi][safi]);
+ peer->hash[afi][safi] = NULL;
}
}