HomeClusterLabs Projects

High: crmd: Prevent use-after-free when calling delete_resource due to…

Description

High: crmd: Prevent use-after-free when calling delete_resource due to CRM_OP_REPROBE

The GHashTable iterator is invalidated when g_hash_table_remove is called.
Instead, pass down the iterator to delete_rsc_entry so that
g_hash_table_iter_remove can be used directly instead.

Also, use rsc_id_copy, not rsc_id, after the entry rsc_id refers to has been
removed from the resource_history hashtable. rsc_id is aliased with the id
field in the entry itself, and it is freed at this point.

Details

Provenance
Barney Desmond <barney.desmond@anchor.net.au>Authored on Feb 12 2012, 11:08 PM
Andrew Beekhof <andrew@beekhof.net>Committed on Feb 16 2012, 8:18 PM
Parents
rP6795acd9a2b4: Low: Build: Build with cman support by default on fedora < 17
Branches
Unknown
Tags
Unknown

Event Timeline