git: 3d5e539b1f43 - stable/14 - xdr: Stop checking for failures from malloc(M_WAITOK)
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 30 Sep 2024 04:45:14 UTC
The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=3d5e539b1f43dec0abd2df61cb958550ef9606a0 commit 3d5e539b1f43dec0abd2df61cb958550ef9606a0 Author: Zhenlei Huang <zlei@FreeBSD.org> AuthorDate: 2024-09-03 10:25:20 +0000 Commit: Zhenlei Huang <zlei@FreeBSD.org> CommitDate: 2024-09-30 04:44:16 +0000 xdr: Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 7a720bf67d73ba565a0a1130065f798870eb5faa) --- sys/xdr/xdr_sizeof.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/xdr/xdr_sizeof.c b/sys/xdr/xdr_sizeof.c index 6491fa80dce1..fc341dcaa9df 100644 --- a/sys/xdr/xdr_sizeof.c +++ b/sys/xdr/xdr_sizeof.c @@ -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);