If there are'nt any bpf descriptors to process than dont bother attempting to

retrieve statistic information for them.

Pointed out by:	Pawel Worach < pawel.worach at gmail.com >
This commit is contained in:
Christian S.J. Peron 2005-09-13 22:13:01 +00:00
parent 60d47f2c0a
commit 15f3d81f9c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=150113

View File

@ -91,6 +91,8 @@ bpf_stats(char *interface)
warn("net.bpf.stats");
return;
}
if (size == 0)
return;
bd = malloc(size);
if (bd == NULL) {
warn("malloc failed");