Date: Fri, 8 Mar 2002 21:40:02 -0800 (PST) From: Dima Dorfman <dima@trit.org> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/35700: a small code update Message-ID: <200203090540.g295e2g33868@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/35700; it has been noted by GNATS. From: Dima Dorfman <dima@trit.org> To: nobody <nobody@nobody.com> Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: kern/35700: a small code update Date: Sat, 09 Mar 2002 05:32:23 +0000 nobody <nobody@nobody.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203090540.g295e2g33868>