summaryrefslogtreecommitdiffstats
path: root/ctdb/server/eventscript.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2009-11-03 20:01:00 +0100
committerMichael Adam <obnox@samba.org>2009-11-05 11:13:53 +0100
commit1fa1830f81bb335ca5bb9f2fb3fb2644f418e559 (patch)
tree4869d2ea105444b46815accf61880575c3e27e62 /ctdb/server/eventscript.c
parent85a4d9a943e1c4ced6f69efd6cc26bd08e08f2fc (diff)
downloadsamba-1fa1830f81bb335ca5bb9f2fb3fb2644f418e559.tar.gz
samba-1fa1830f81bb335ca5bb9f2fb3fb2644f418e559.tar.xz
samba-1fa1830f81bb335ca5bb9f2fb3fb2644f418e559.zip
Fix a segfault in the eventscript timeout handler.
The state was freed too early. Signed-off-by: Michael Adam <obnox@samba.org> (This used to be ctdb commit eda052101728cf922ce892e3c53b4f37e7ceac42)
Diffstat (limited to 'ctdb/server/eventscript.c')
-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 9711ebaabe..7ad66c6c6d 100644
--- a/ctdb/server/eventscript.c
+++ b/ctdb/server/eventscript.c
@@ -689,7 +689,6 @@ static void ctdb_event_script_timeout(struct event_context *ev, struct timed_eve
options = talloc_strdup(ctdb, state->options);
CTDB_NO_MEMORY_VOID(ctdb, options);
- talloc_free(state);
if (!strcmp(options, "monitor")) {
/* if it is a monitor event, we allow it to "hang" a few times
before we declare it a failure and ban ourself (and make
@@ -752,6 +751,7 @@ static void ctdb_event_script_timeout(struct event_context *ev, struct timed_eve
ctdb->script_monitor_ctx = NULL;
}
+ talloc_free(state);
talloc_free(options);
}