summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2015-07-10 14:02:29 +1000
committerAmitay Isaacs <amitay@samba.org>2015-07-14 09:57:17 +0200
commitf951ff13838e796cd6661d800daf460247cac60b (patch)
treee988d07d1a39193c48e183f2f99a31a1606989a4 /ctdb
parent8ed0cacaf4aa9fc63b8c8d610a6164c5d01e473a (diff)
downloadsamba-f951ff13838e796cd6661d800daf460247cac60b.tar.gz
ctdb-daemon: Avoid double-free during monitor cancellation
The eventscript state should never be freed externally, so it should never be allocated off a temporary context. It will either be freed by the handler or in the cancellation code. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Pair-programmed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb')
-rw-r--r--ctdb/server/eventscript.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ctdb/server/eventscript.c b/ctdb/server/eventscript.c
index 62fab5f1ede..6a308623412 100644
--- a/ctdb/server/eventscript.c
+++ b/ctdb/server/eventscript.c
@@ -977,7 +977,7 @@ int32_t ctdb_run_eventscripts(struct ctdb_context *ctdb,
DEBUG(DEBUG_NOTICE,("Running eventscripts with arguments %s\n", indata.dptr));
ret = ctdb_event_script_callback(ctdb,
- state, run_eventscripts_callback, state,
+ ctdb, run_eventscripts_callback, state,
call, "%s", options);
if (ret != 0) {