diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2010-07-01 21:19:58 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2010-07-01 21:19:58 +0000 |
commit | de101667466fd782081d6f7cb241706f15b3d283 (patch) | |
tree | bd9191fcae39228da4a0731e8eab4a15c950b14a /usr.sbin | |
parent | 968afd91d89d89e8ff784d75f134167f454e6f73 (diff) |
Fix memory leak by adding a missing free(lsa).
ok claudio@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ospf6d/rde.c | 4 | ||||
-rw-r--r-- | usr.sbin/ospfd/rde.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/ospf6d/rde.c b/usr.sbin/ospf6d/rde.c index a9ca048a825..fd144ea1347 100644 --- a/usr.sbin/ospf6d/rde.c +++ b/usr.sbin/ospf6d/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.44 2010/07/01 19:47:04 bluhm Exp $ */ +/* $OpenBSD: rde.c,v 1.45 2010/07/01 21:19:57 bluhm Exp $ */ /* * Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org> @@ -688,6 +688,8 @@ rde_dispatch_parent(int fd, short event, void *bula) */ if (v) lsa_merge(nbrself, lsa, v); + else + free(lsa); } break; case IMSG_KROUTE_GET: diff --git a/usr.sbin/ospfd/rde.c b/usr.sbin/ospfd/rde.c index bd76d373ce0..1dd96577f0a 100644 --- a/usr.sbin/ospfd/rde.c +++ b/usr.sbin/ospfd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.85 2010/05/26 13:56:08 nicm Exp $ */ +/* $OpenBSD: rde.c,v 1.86 2010/07/01 21:19:57 bluhm Exp $ */ /* * Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org> @@ -653,6 +653,8 @@ rde_dispatch_parent(int fd, short event, void *bula) */ if (v) lsa_merge(nbrself, lsa, v); + else + free(lsa); } break; case IMSG_RECONF_CONF: |