HomeClusterLabs Projects

Fix: tools: Don't leak options.xml_file in crm_simulate.

Description

Fix: tools: Don't leak options.xml_file in crm_simulate.

Unconditionally setting xml_file before option processing occurs means
that if --xml-file= is passed as an argument, the default value will be
overwritten without being freed. Change the code to use a callback that
can free the string first. We can't just leave xml_file NULL and set it
conditionally after option processing happens, because a NULL value also
means something.

Also, fix a typo.

Details

Provenance
clumensAuthored on Oct 9 2020, 4:35 PM
Parents
rP25be2901d36d: Fix: Guard config.h against multiple inclusion.
Branches
Unknown
Tags
Unknown

Event Timeline