diff options
author | Jorge Boncompte [DTI2] <jorge@dti2.net> | 2012-05-07 16:53:02 +0000 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2012-05-22 20:25:49 +0200 |
commit | 6182d65b23fc0362b173e2a9314fa4551523a1c2 (patch) | |
tree | fb99eb9565f5ea8aa6a8b88eb9c4c05dc7cf364a /bgpd/bgp_route.c | |
parent | b9f1dca10f9a9bf853a9999a117c8cdeec5b7b69 (diff) | |
download | quagga-6182d65b23fc0362b173e2a9314fa4551523a1c2.tar.bz2 quagga-6182d65b23fc0362b173e2a9314fa4551523a1c2.tar.xz |
bgpd: fix struct attr_extra leak in bgp_default_originate()
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@dti2.net>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'bgpd/bgp_route.c')
-rw-r--r-- | 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 68eae6a0..a421fd7c 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. */ |