Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP2:Update
slurm
U_16-Use-try_xmalloc-on-user-specified-buffer-s...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File U_16-Use-try_xmalloc-on-user-specified-buffer-sizes.patch of Package slurm
From: Tim Wickberg <tim@schedmd.com> Date: Wed Nov 29 14:34:06 2023 -0700 Subject: [PATCH 16/28]Use try_xmalloc() on user-specified buffer sizes. Patch-mainline: Upstream Git-repo: https://github.com/SchedMD/slurm Git-commit: 7c461a88444246774cfe7267ea0fc5e26dc802ed References: bsc#1218046, bsc#1218050, bsc#1218051, bsc#1218053 Signed-off-by: Egbert Eich <eich@suse.de> --- src/common/slurm_protocol_socket.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/slurm_protocol_socket.c b/src/common/slurm_protocol_socket.c index 62076e16cb..f780ccbc46 100644 --- a/src/common/slurm_protocol_socket.c +++ b/src/common/slurm_protocol_socket.c @@ -148,7 +148,8 @@ extern ssize_t slurm_msg_recvfrom_timeout(int fd, char **pbuf, size_t *lenp, /* * Allocate memory on heap for message */ - *pbuf = xmalloc_nz(msglen); + if (!(*pbuf = try_xmalloc(msglen))) + slurm_seterrno_ret(ENOMEM); if (slurm_recv_timeout(fd, *pbuf, msglen, 0, tmout) != msglen) { xfree(*pbuf);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor