Date: Thu, 13 Jul 2006 18:12:22 +0800 From: Blue <Susan.Lan@zyxel.com.tw> To: freebsd-bugs@freebsd.org Subject: [FreeBSD-6.1Release]bug in netstat? Message-ID: <44B61C86.1070504@zyxel.com.tw>
next in thread | raw e-mail | index | archive | help
Hi, all: I have a few questions aout sidewaysintpr() in netstat\if.c. Why needs to allocate a list of struct iftot, and it's number is equal to the number of interfaces? I have traced the codes and found there's no special usage of the struct iftot list. Besides, the list of malloc space is never freed. Another problem is in line 667-669 for (off = firstifnet, ip = iftot; off && SLIST_NEXT(ip, chain) != NULL; ip = SLIST_NEXT(ip, chain)) { .................... } The codes above will not count in the last interface in the ifnet list. I think the statement should be: for (off = firstifnet, ip = iftot; off && ip; ip = SLIST_NEXT(ip, chain)) { .................... } Though the iftot list is supposed to be removed in my point of view. Could anyone give me any reason or hints? Best regards, blue
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44B61C86.1070504>