summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2011-01-14 20:07:01 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2011-01-14 20:07:01 +0000
commitb21a84df07bc2d57ebf6301492faf6a0755a4ef2 (patch)
treec627c1bd4b280c7317a58f53fd9db4b15a85ab9f /usr.sbin/bgpd
parent67b5f16578df3dafbe03bbc9f064e0b9439d769a (diff)
plug memleak in err path; from zinovik, ok claudio
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r--usr.sbin/bgpd/rde_rib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/rde_rib.c b/usr.sbin/bgpd/rde_rib.c
index 9a13486be06..fcbfac9e218 100644
--- a/usr.sbin/bgpd/rde_rib.c
+++ b/usr.sbin/bgpd/rde_rib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_rib.c,v 1.127 2010/05/03 13:09:38 claudio Exp $ */
+/* $OpenBSD: rde_rib.c,v 1.128 2011/01/14 20:07:00 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org>
@@ -216,6 +216,7 @@ rib_add(struct rib *rib, struct bgpd_addr *prefix, int prefixlen)
if (RB_INSERT(rib_tree, &rib->rib, re) != NULL) {
log_warnx("rib_add: insert failed");
+ free(re);
return (NULL);
}