HomeClusterLabs Projects

Low: fencing: improve error handling when executing fence actions

Description

Low: fencing: improve error handling when executing fence actions

Mainly this is to avoid a possible double-free.
internal_stonith_action_execute() reuses one set of parameters for both
svc_action_t and stonith_action_t, so we have to be sure to set params to NULL
before freeing svc_action_t, so stonith_action_t retains ownership of them.

This also moves the argument sanity-check before any processing, and adds more
checks to it.

Details

Provenance
kgaillotAuthored on Sep 16 2021, 3:19 PM
Parents
rP4745b8586132: Refactor: libcrmservice: initialize rc/status when creating action
Branches
Unknown
Tags
Unknown

Event Timeline