Permalink
Browse files

Fix: PE: Memory leak when updating cancel operations

  • Loading branch information...
beekhof committed Feb 28, 2014
1 parent b593e97 commit 37457be1592449cd4263143083731795e2f08a5d
Showing with 3 additions and 0 deletions.
  1. +1 −0 pengine/allocate.c
  2. +2 −0 pengine/native.c
View
@@ -172,6 +172,7 @@ CancelXmlOp(resource_t * rsc, xmlNode * xml_op, node_t * active_node,
cancel = custom_action(rsc, strdup(key), RSC_CANCEL, active_node, FALSE, TRUE, data_set);
free(cancel->task);
+ free(cancel->cancel_task);
cancel->task = strdup(RSC_CANCEL);
cancel->cancel_task = strdup(task);
View
@@ -730,6 +730,7 @@ RecurringOp(resource_t * rsc, action_t * start, node_t * node,
mon = custom_action(rsc, local_key, RSC_CANCEL, node, FALSE, TRUE, data_set);
free(mon->task);
+ free(mon->cancel_task);
mon->task = strdup(RSC_CANCEL);
mon->cancel_task = strdup(name);
add_hash_param(mon->meta, XML_LRM_ATTR_INTERVAL, interval);
@@ -907,6 +908,7 @@ RecurringOp_Stopped(resource_t * rsc, action_t * start, node_t * node,
cancel_op = custom_action(rsc, local_key, RSC_CANCEL, node, FALSE, TRUE, data_set);
free(cancel_op->task);
+ free(cancel_op->cancel_task);
cancel_op->task = strdup(RSC_CANCEL);
cancel_op->cancel_task = strdup(name);
add_hash_param(cancel_op->meta, XML_LRM_ATTR_INTERVAL, interval);

0 comments on commit 37457be

Please sign in to comment.