Fix memory leak in last revision.

Approved by:	bapt (blanket)
This commit is contained in:
Gleb Smirnoff 2014-10-02 19:50:44 +00:00
parent cd4be1dd0b
commit 034b566fcf
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=369855
2 changed files with 5 additions and 3 deletions

View file

@ -3,7 +3,7 @@
PORTNAME= plan9port PORTNAME= plan9port
PORTVERSION= 20140306 PORTVERSION= 20140306
PORTREVISION= 2 PORTREVISION= 3
CATEGORIES= devel plan9 CATEGORIES= devel plan9
MASTER_SITES= http://swtch.com/${PORTNAME}/ MASTER_SITES= http://swtch.com/${PORTNAME}/

View file

@ -1,5 +1,5 @@
--- src/cmd/auxstats/FreeBSD.c.orig 2010-03-18 01:25:34.000000000 +0300 --- src/cmd/auxstats/FreeBSD.c.orig 2010-03-18 01:25:34.000000000 +0300
+++ src/cmd/auxstats/FreeBSD.c 2014-10-02 22:55:32.000000000 +0400 +++ src/cmd/auxstats/FreeBSD.c 2014-10-02 23:43:36.000000000 +0400
@@ -8,20 +8,15 @@ @@ -8,20 +8,15 @@
#include <sys/time.h> #include <sys/time.h>
#include <sys/dkstat.h> #include <sys/dkstat.h>
@ -30,7 +30,7 @@
{ "_cp_time" }, { "_cp_time" },
{ "" } { "" }
}; };
@@ -86,44 +80,26 @@ @@ -86,45 +80,28 @@
void void
xnet(int first) xnet(int first)
{ {
@ -85,5 +85,7 @@
+ inb += IFA_STAT(ibytes); + inb += IFA_STAT(ibytes);
+ err += IFA_STAT(oerrors) + IFA_STAT(ierrors); + err += IFA_STAT(oerrors) + IFA_STAT(ierrors);
} }
+ freeifaddrs(ifap);
Bprint(&bout, "etherin %lud 1000\n", in); Bprint(&bout, "etherin %lud 1000\n", in);
Bprint(&bout, "etherout %lud 1000\n", out); Bprint(&bout, "etherout %lud 1000\n", out);
Bprint(&bout, "etherinb %lud 1000000\n", inb);