From de101667466fd782081d6f7cb241706f15b3d283 Mon Sep 17 00:00:00 2001 From: Alexander Bluhm Date: Thu, 1 Jul 2010 21:19:58 +0000 Subject: Fix memory leak by adding a missing free(lsa). ok claudio@ --- usr.sbin/ospf6d/rde.c | 4 +++- 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 @@ -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 @@ -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: -- cgit v1.2.3