mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
xdr: Stop checking for failures from malloc(M_WAITOK)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D45852
(cherry picked from commit 7a720bf67d)
This commit is contained in:
parent
ce70888084
commit
3d5e539b1f
1 changed files with 1 additions and 4 deletions
|
|
@ -95,10 +95,7 @@ x_inline(XDR *xdrs, u_int len)
|
|||
/* Free the earlier space and allocate new area */
|
||||
if (xdrs->x_private)
|
||||
free(xdrs->x_private, M_RPC);
|
||||
if ((xdrs->x_private = (caddr_t) malloc(len, M_RPC, M_WAITOK)) == NULL) {
|
||||
xdrs->x_base = 0;
|
||||
return (NULL);
|
||||
}
|
||||
xdrs->x_private = malloc(len, M_RPC, M_WAITOK);
|
||||
xdrs->x_base = (caddr_t)(uintptr_t) len;
|
||||
xdrs->x_handy += len;
|
||||
return ((int32_t *) xdrs->x_private);
|
||||
|
|
|
|||
Loading…
Reference in a new issue