1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

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)
This commit is contained in:
Volker Lendecke 2009-11-03 20:01:00 +01:00 committed by Michael Adam
parent 85a4d9a943
commit 1fa1830f81

View File

@ -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);
}