Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP3:Update
slurm.32296
U_24-Allow-malloc-to-fail-and-return-an-error-i...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File U_24-Allow-malloc-to-fail-and-return-an-error-instead-of-abort-ing.patch of Package slurm.32296
From: Tim Wickberg <tim@schedmd.com> Date: Wed Nov 29 15:44:01 2023 -0700 Subject: [PATCH 24/28]Allow malloc() to fail and return an error instead of abort()ing. Patch-mainline: Upstream Git-repo: https://github.com/SchedMD/slurm Git-commit: e549d8e9fd5a0492fd57b1b3e3cb113a80d1c2ce References: bsc#1218046, bsc#1218050, bsc#1218051, bsc#1218053 Signed-off-by: Egbert Eich <eich@suse.de> --- src/common/pack.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/common/pack.c b/src/common/pack.c index ca0fb4cf0f..bede56e854 100644 --- a/src/common/pack.c +++ b/src/common/pack.c @@ -949,11 +949,8 @@ int unpackmem_malloc(char **valp, uint32_t * size_valp, Buf buffer) if (remaining_buf(buffer) < *size_valp) goto unpack_error; - *valp = malloc(*size_valp); - if (*valp == NULL) { - log_oom(__FILE__, __LINE__, __func__); - abort(); - } + if (!(*valp = malloc(*size_valp))) + goto unpack_error; memcpy(*valp, &buffer->head[buffer->processed], *size_valp); buffer->processed += *size_valp;
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