HomeClusterLabs Projects

Low: scheduler: improve error handling when unpacking resources

Description

Low: scheduler: improve error handling when unpacking resources

Previously, pe__unpack_resource() was inconsistent about freeing memory and
setting *rsc to NULL on errors, and callers were inconsistent about freeing
*rsc, potentially causing memory leaks or segmentation faults.

Now, pe__unpack_resources() always frees and NULLs *rsc on error.

Also improve the function's log messages.

Details

Provenance
kgaillotAuthored on Oct 20 2022, 5:36 PM
Parents
rPc05bb8df3b36: Test: cts-scheduler: add test for group stickiness outweighing anti-colocation
Branches
Unknown
Tags
Unknown