summaryrefslogtreecommitdiff
path: root/bgpd/bgp_attr.c
diff options
context:
space:
mode:
authorJorge Boncompte [DTI2] <jorge@dti2.net>2012-05-07 16:52:57 +0000
committerDavid Lamparter <equinox@opensourcerouting.org>2012-05-22 20:25:49 +0200
commite16a413313cf985ae2b8d2f1a9e8fd0ab6f5b9fc (patch)
treee6810289e60312da431a8f992903275d952d0e6b /bgpd/bgp_attr.c
parent8ff56318a8bd188cfcc1cdab689c46c326b50d38 (diff)
bgpd: remove some useless initializations
* bgp_attr.c: (bgp_attr_default_intern) bgp_attr_default_set() already initializes the memory. Fixes a struct attr_extra leak. * bgp_route.c: Remove useless on stack struct initializations. Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'bgpd/bgp_attr.c')
-rw-r--r--bgpd/bgp_attr.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c
index 8144cd36..7c0f6cc6 100644
--- a/bgpd/bgp_attr.c
+++ b/bgpd/bgp_attr.c
@@ -559,10 +559,7 @@ bgp_attr_default_intern (u_char origin)
{
struct attr attr;
struct attr *new;
-
- memset (&attr, 0, sizeof (struct attr));
- bgp_attr_extra_get (&attr);
-
+
bgp_attr_default_set(&attr, origin);
new = bgp_attr_intern (&attr);