mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-19 10:53:58 +00:00
malloc() with M_WAITOK doesn't return NULL.
MFC after: 1 week
This commit is contained in:
parent
df10106a87
commit
ee839ce84c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=261084
@ -122,10 +122,7 @@ geom_alloc_copyin(struct gctl_req *req, void *uaddr, size_t len)
|
||||
void *ptr;
|
||||
|
||||
ptr = g_malloc(len, M_WAITOK);
|
||||
if (ptr == NULL)
|
||||
req->nerror = ENOMEM;
|
||||
else
|
||||
req->nerror = copyin(uaddr, ptr, len);
|
||||
nreq->nerror = copyin(uaddr, ptr, len);
|
||||
if (!req->nerror)
|
||||
return (ptr);
|
||||
if (ptr != NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user