mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 05:58:57 +00:00
Don't use the pointer returned by MALLOC before checking if it is NULL.
PR: 9871 (part of it) Submitted by: Boris Popov <bp@butya.kz>
This commit is contained in:
parent
8ffb208fa0
commit
d468daa7d2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=43711
@ -33,7 +33,7 @@
|
||||
*
|
||||
* @(#)spx_usrreq.h
|
||||
*
|
||||
* $Id: spx_usrreq.c,v 1.23 1999/01/27 22:42:26 dillon Exp $
|
||||
* $Id: spx_usrreq.c,v 1.24 1999/01/28 00:57:51 dillon Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -1335,13 +1335,13 @@ spx_attach(so, proto, p)
|
||||
ipxp = sotoipxpcb(so);
|
||||
|
||||
MALLOC(cb, struct spxpcb *, sizeof *cb, M_PCB, M_NOWAIT);
|
||||
bzero(cb, sizeof *cb);
|
||||
sb = &so->so_snd;
|
||||
|
||||
if (cb == NULL) {
|
||||
error = ENOBUFS;
|
||||
goto spx_attach_end;
|
||||
}
|
||||
bzero(cb, sizeof *cb);
|
||||
sb = &so->so_snd;
|
||||
|
||||
mm = m_getclr(M_DONTWAIT, MT_HEADER);
|
||||
if (mm == NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user