From owner-freebsd-bugs Fri Mar 8 21:40: 5 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 4FC4C37B404 for ; Fri, 8 Mar 2002 21:40:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g295e2g33868; Fri, 8 Mar 2002 21:40:02 -0800 (PST) (envelope-from gnats) Date: Fri, 8 Mar 2002 21:40:02 -0800 (PST) Message-Id: <200203090540.g295e2g33868@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Dima Dorfman Subject: Re: kern/35700: a small code update Reply-To: Dima Dorfman Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR kern/35700; it has been noted by GNATS. From: Dima Dorfman To: nobody Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: kern/35700: a small code update Date: Sat, 09 Mar 2002 05:32:23 +0000 nobody wrote: > # more /tmp/bpfdiffs > --- /usr/src/sys/net/bpfold.c Fri Mar 8 17:18:45 2002 > +++ /usr/src/sys/net/bpf.c Fri Mar 8 17:26:01 2002 > @@ -990,7 +990,9 @@ > return (EINVAL); > > size = flen * sizeof(*fp->bf_insns); > - fcode = (struct bpf_insn *)malloc(size, M_BPF, M_WAITOK); > + if((fcode = (struct bpf_insn *)malloc(size, M_BPF, M_WAITOK)) == NULL) > + return (EINVAL); No, the original is right; kernel malloc won't return NULL if M_WAITOK is specified. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message