Refactor: based: cib_cleanup_query() frees output if not current CIB
cib_process_command() is the only caller of operation->cleanup() (and
thus the only caller of cib_cleanup_query()). All other cleanup
functions already either free output or ensure that it's NULL.
So it's safe to move this step into cib_cleanup_query(), instead of
checking that cib_op_attr_modifies is unset and output != current_cib in
cib_process_command().
Further:
- If cib_no_children is set, then cib_process_query() or cib_process_xpath() creates a new output XML object that is not the_cib. So (*output != the_cib) in this case.
- If the element name is "xpath-query", then surely *output != the_cib.
So both of the original conditions are now redundant.
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>