summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ctdb/server/ctdb_lock.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/ctdb/server/ctdb_lock.c b/ctdb/server/ctdb_lock.c
index 6a79e209232..82295ea5dcb 100644
--- a/ctdb/server/ctdb_lock.c
+++ b/ctdb/server/ctdb_lock.c
@@ -392,6 +392,8 @@ static void process_callbacks(struct lock_context *lock_ctx, bool locked)
break;
}
}
+
+ talloc_free(lock_ctx);
}
@@ -437,7 +439,6 @@ static void ctdb_lock_handler(struct tevent_context *ev,
void *private_data)
{
struct lock_context *lock_ctx;
- TALLOC_CTX *tmp_ctx = NULL;
char c;
bool locked;
double t;
@@ -451,11 +452,6 @@ static void ctdb_lock_handler(struct tevent_context *ev,
t = timeval_elapsed(&lock_ctx->start_time);
id = lock_bucket_id(t);
- if (lock_ctx->auto_mark) {
- tmp_ctx = talloc_new(ev);
- talloc_steal(tmp_ctx, lock_ctx);
- }
-
/* Read the status from the child process */
if (sys_read(lock_ctx->fd[0], &c, 1) != 1) {
locked = false;
@@ -487,10 +483,6 @@ static void ctdb_lock_handler(struct tevent_context *ev,
}
process_callbacks(lock_ctx, locked);
-
- if (lock_ctx->auto_mark) {
- talloc_free(tmp_ctx);
- }
}