summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/rde_attr.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2006-03-15 11:26:46 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2006-03-15 11:26:46 +0000
commitad29d0e6d58273c0ac473ccf4e7d7986993d74fb (patch)
treeec86df0c30a3ea10a8e9c919034a90729224de84 /usr.sbin/bgpd/rde_attr.c
parentf1fc405fd29965ce09c88e13224a783de19a58b3 (diff)
Fix a memory leak when communities are set or deleted. This seems to fix
Sylvain Coutant memory issues. A lot of patience and testing by Sylvain.
Diffstat (limited to 'usr.sbin/bgpd/rde_attr.c')
-rw-r--r--usr.sbin/bgpd/rde_attr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/rde_attr.c b/usr.sbin/bgpd/rde_attr.c
index 715f3c0ecff..3b1122cd32c 100644
--- a/usr.sbin/bgpd/rde_attr.c
+++ b/usr.sbin/bgpd/rde_attr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_attr.c,v 1.63 2006/02/09 21:05:09 claudio Exp $ */
+/* $OpenBSD: rde_attr.c,v 1.64 2006/03/15 11:26:45 claudio Exp $ */
/*
* Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org>
@@ -774,6 +774,7 @@ community_set(struct rde_aspath *asp, int as, int type)
attr_optadd(asp, f, t, p, ncommunities << 2);
+ free(p);
return (1);
}
@@ -836,5 +837,6 @@ community_delete(struct rde_aspath *asp, int as, int type)
attr_free(asp, attr);
attr_optadd(asp, f, t, n, len);
+ free(n);
}