diff options
author | 2015-02-12 23:31:12 +0000 | |
---|---|---|
committer | 2015-02-12 23:31:12 +0000 | |
commit | 30a4ef04e86f9fa4ba42a6c25e971d3b85e17eee (patch) | |
tree | 2effbb49e76023aa446082be1fa5cbed2f716688 | |
parent | Make syslogd tests more reliable. Increase the allowed range of (diff) | |
download | wireguard-openbsd-30a4ef04e86f9fa4ba42a6c25e971d3b85e17eee.tar.xz wireguard-openbsd-30a4ef04e86f9fa4ba42a6c25e971d3b85e17eee.zip |
Free the buffers used for the sysctl. OK sthen@
-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); } /* |