diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2015-02-12 23:31:13 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2015-02-12 23:31:13 +0000 |
commit | eef4f64fcf2ad649e744938cbaed3211c769b708 (patch) | |
tree | ebe22735bda2fd7b30056a89dc2e0532b71d7f67 /usr.bin | |
parent | 4e53b6db78449cfa95862d3293d8c2d733a52cb8 (diff) |
Free the buffers used for the sysctl. OK sthen@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/netstat/mroute.c | 4 | ||||
-rw-r--r-- | usr.bin/netstat/mroute6.c | 4 | ||||
-rw-r--r-- | usr.bin/netstat/show.c | 5 |
3 files changed, 8 insertions, 5 deletions
diff --git a/usr.bin/netstat/mroute.c b/usr.bin/netstat/mroute.c index 9014996bb76..b9358bea40d 100644 --- a/usr.bin/netstat/mroute.c +++ b/usr.bin/netstat/mroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mroute.c,v 1.24 2015/02/09 12:25:03 claudio Exp $ */ +/* $OpenBSD: mroute.c,v 1.25 2015/02/12 23:31:12 claudio Exp $ */ /* $NetBSD: mroute.c,v 1.10 1996/05/11 13:51:27 mycroft Exp $ */ /* @@ -151,6 +151,8 @@ mroutepr(void) printf("\n"); nflag = saved_nflag; + + free(buf); } void diff --git a/usr.bin/netstat/mroute6.c b/usr.bin/netstat/mroute6.c index c36602192b7..270551e29b9 100644 --- a/usr.bin/netstat/mroute6.c +++ b/usr.bin/netstat/mroute6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mroute6.c,v 1.18 2015/02/12 13:06:47 sthen Exp $ */ +/* $OpenBSD: mroute6.c,v 1.19 2015/02/12 23:31:12 claudio Exp $ */ /* * Copyright (C) 1998 WIDE Project. @@ -187,6 +187,8 @@ mroute6pr(void) printf("\n"); nflag = saved_nflag; + + free(buf); } void diff --git a/usr.bin/netstat/show.c b/usr.bin/netstat/show.c index c6bdf2522df..a843e3e44c6 100644 --- a/usr.bin/netstat/show.c +++ b/usr.bin/netstat/show.c @@ -1,4 +1,4 @@ -/* $OpenBSD: show.c,v 1.46 2015/02/09 12:25:03 claudio Exp $ */ +/* $OpenBSD: show.c,v 1.47 2015/02/12 23:31:12 claudio Exp $ */ /* $NetBSD: show.c,v 1.1 1996/11/15 18:01:41 gwr Exp $ */ /* @@ -162,9 +162,8 @@ p_rttables(int af, u_int tableid) continue; p_rtentry(rtm); } - free(buf); - buf = NULL; } + free(buf); } /* |