Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.5:Update
slurm.32296
U_02-Protect-against-double-xfree.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File U_02-Protect-against-double-xfree.patch of Package slurm.32296
From: Tim Wickberg <tim@schedmd.com> Date: Tue Nov 28 17:05:18 2023 -0700 Subject: [PATCH 2/28]Protect against double-xfree(). Patch-mainline: Upstream Git-repo: https://github.com/SchedMD/slurm Git-commit: 3f36ce9ab63ed92e754a78be3ebbd9fa9b481b34 References: bsc#1218046, bsc#1218050, bsc#1218051, bsc#1218053 Signed-off-by: Egbert Eich <eich@suse.de> --- src/common/slurm_protocol_pack.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/common/slurm_protocol_pack.c b/src/common/slurm_protocol_pack.c index 517011796c..511ca6ef95 100644 --- a/src/common/slurm_protocol_pack.c +++ b/src/common/slurm_protocol_pack.c @@ -14058,6 +14058,15 @@ unpack_msg(slurm_msg_t * msg, Buf buffer) if (rc) { error("Malformed RPC of type %s(%u) received", rpc_num2string(msg->msg_type), msg->msg_type); + + /* + * The unpack functions should not leave this set on error, + * doing so would likely result in a double xfree() if we + * did not proactively clear it. (Which, instead, may cause + * a memory leak. But that's preferrable.) + */ + xassert(msg->data); + msg->data = NULL; } return rc; }
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