From bc14947bbae1b9761c21acd8fdea70ce8cd028b4 Mon Sep 17 00:00:00 2001 From: David Hill Date: Wed, 24 Dec 2008 16:53:23 +0000 Subject: Plug a couple of memory leaks noticed by deraadt. ok otto@ --- usr.bin/netstat/if.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.bin/netstat/if.c b/usr.bin/netstat/if.c index 29785a2287c..d6df072e899 100644 --- a/usr.bin/netstat/if.c +++ b/usr.bin/netstat/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.57 2008/03/18 20:03:37 claudio Exp $ */ +/* $OpenBSD: if.c,v 1.58 2008/12/24 16:53:22 dhill Exp $ */ /* $NetBSD: if.c,v 1.16.4.2 1996/06/07 21:46:46 thorpej Exp $ */ /* @@ -172,6 +172,7 @@ intpr(int interval) break; } } + free(buf); } static void @@ -566,4 +567,5 @@ fetchifs(void) ip_cur.ift_dr = 0; /* XXX ifnet.if_snd.ifq_drops */ } + free(buf); } -- cgit v1.2.3