Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Quagga: Dev

[PATCH 12/25] bgpd: fix struct attr_extra leak in bgp_default_originate()

 

 

Quagga dev RSS feed   Index | Next | Previous | View Threaded


jorge at dti2

May 7, 2012, 10:53 AM

Post #1 of 1 (127 views)
Permalink
[PATCH 12/25] bgpd: fix struct attr_extra leak in bgp_default_originate()

From: "Jorge Boncompte [DTI2]" <jorge [at] dti2>

The call to bgp_attr_default_set() above creates the attr_extra struct,
but the attr.extra = NULL initialization was leaking it.

Signed-off-by: Jorge Boncompte [DTI2] <jorge [at] dti2>
---
bgpd/bgp_route.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index a0cf0be..ad942e2 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -2488,12 +2488,8 @@ bgp_default_originate (struct peer *peer, afi_t afi, safi_t safi, int withdraw)
#ifdef HAVE_IPV6
else if (afi == AFI_IP6)
{
- struct attr_extra *ae;
- attr.extra = NULL;
-
- ae = bgp_attr_extra_get (&attr);
- attr.extra = ae;
-
+ struct attr_extra *ae = attr.extra;
+
str2prefix ("::/0", &p);

/* IPv6 global nexthop must be included. */
--
1.7.8.3


_______________________________________________
Quagga-dev mailing list
Quagga-dev [at] lists
http://lists.quagga.net/mailman/listinfo/quagga-dev

Quagga dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.