summaryrefslogtreecommitdiffstats
path: root/sys/netipx
diff options
context:
space:
mode:
authorjhay <jhay@FreeBSD.org>1999-02-06 10:45:17 +0000
committerjhay <jhay@FreeBSD.org>1999-02-06 10:45:17 +0000
commit263576a9fc3b774ced351c2c66aceede13ddf62d (patch)
treebc38facccf1afb746129b49d75e073921972d8c4 /sys/netipx
parent4fb7704d093e705fbfe52df52efcbdd09a2b21ba (diff)
downloadFreeBSD-src-263576a9fc3b774ced351c2c66aceede13ddf62d.zip
FreeBSD-src-263576a9fc3b774ced351c2c66aceede13ddf62d.tar.gz
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>
Diffstat (limited to 'sys/netipx')
-rw-r--r--sys/netipx/spx_usrreq.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netipx/spx_usrreq.c b/sys/netipx/spx_usrreq.c
index 2cb151d..8a23b0e 100644
--- a/sys/netipx/spx_usrreq.c
+++ b/sys/netipx/spx_usrreq.c
@@ -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) {
OpenPOWER on IntegriCloud