- td will never be NULL, so the call to soalloc() in socreate() will always
be passed a 1; we can, however, use M_NOWAIT to indicate this. - Check so against NULL since it's a pointer to a structure.
This commit is contained in:
parent
0e54ddadd9
commit
ec41816009
@ -171,8 +171,8 @@ socreate(dom, aso, type, proto, cred, td)
|
||||
|
||||
if (prp->pr_type != type)
|
||||
return (EPROTOTYPE);
|
||||
so = soalloc(td != 0);
|
||||
if (so == 0)
|
||||
so = soalloc(M_NOWAIT);
|
||||
if (so == NULL)
|
||||
return (ENOBUFS);
|
||||
|
||||
SOCK_LOCK(so);
|
||||
|
Loading…
x
Reference in New Issue
Block a user