Date: Thu, 16 Jul 2009 18:27:56 GMT From: Gabor Pali <pgj@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 166169 for review Message-ID: <200907161827.n6GIRum9014300@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=166169 Change 166169 by pgj@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 }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907161827.n6GIRum9014300>
