PERFORCE change 166169 for review
Gabor Pali
pgj at FreeBSD.org
Thu Jul 16 18:27:58 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=166169
Change 166169 by pgj at petymeg-current on 2009/07/16 18:27:31
Fix a small bug when leaving the iterator routine for unix
domain sockets.
Affected files ...
.. //depot/projects/soc2009/pgj_libstat/src/usr.bin/netstat/unix.c#18 edit
Differences ...
==== //depot/projects/soc2009/pgj_libstat/src/usr.bin/netstat/unix.c#18 (text+ko) ====
@@ -85,7 +85,7 @@
warnx("netstat_socket: %s", kvm_geterr(kvm));
else
warnx("netstat_socket: %s", netstat_strerror(error));
- return;
+ goto out;
}
/*
@@ -97,7 +97,7 @@
#ifdef USE_ITERATOR_TYPE
if (netstat_sti_alloc(stlp, &stip) < 0) {
warnx("netstat_sti_alloc");
- return;
+ goto out;
}
for (stp = netstat_sti_first(stip); stp != NULL;
stp = netstat_sti_next(stip)) {
@@ -105,9 +105,12 @@
netstat_st_free(stp);
}
netstat_sti_free(stip);
+out:
netstat_stl_free(stlp);
#else
netstat_stl_iterate(stlp, unixdomainpr);
+out:
+ netstat_stl_free(sltp);
#endif
}
More information about the p4-projects
mailing list