summaryrefslogtreecommitdiff
path: root/ctdb/server
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2014-09-25 12:44:59 +1000
committerMartin Schwenke <martins@samba.org>2014-09-25 04:54:10 +0200
commitc64369cba2e5a975d87d518737abbf04c9871a26 (patch)
treec8f4c2dd7f36dde397436de4e4f367e21f60eaff /ctdb/server
parent17998fc4cf20cf6d12d7ba3100576163ddb865fa (diff)
downloadsamba-c64369cba2e5a975d87d518737abbf04c9871a26.tar.gz
ctdb-locking: Reset ttimer before doing an early return
When timer expires, timeout handler routine sets lock_ctx->ttimer to a newly created timer event. However, when a node is INACTIVE, timeout handler returns early with lock_ctx->ttimer set to the previous timer event. This timer event gets freed when the callback returns and lock_ctx->ttimer remains set to already freed timer event. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb/server')
-rw-r--r--ctdb/server/ctdb_lock.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ctdb/server/ctdb_lock.c b/ctdb/server/ctdb_lock.c
index e6653102ac6..3a9b32703b7 100644
--- a/ctdb/server/ctdb_lock.c
+++ b/ctdb/server/ctdb_lock.c
@@ -492,6 +492,7 @@ static void ctdb_lock_timeout_handler(struct tevent_context *ev,
/* If a node stopped/banned, don't spam the logs */
if (ctdb->nodes[ctdb->pnn]->flags & NODE_FLAGS_INACTIVE) {
+ lock_ctx->ttimer = NULL;
return;
}
if (lock_ctx->ctdb_db) {