summaryrefslogtreecommitdiffstats
path: root/ctdb
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2014-04-23 11:44:20 +1000
committerMichael Adam <obnox@samba.org>2014-04-23 14:49:07 +0200
commit581ee2e4c32a1ddb77f4fccb6a5ade610998d47e (patch)
tree639c11398f8631440498b9b0fdee586b665b535b /ctdb
parentdb0a1df25c868b4536f879d1191c4317065e6f06 (diff)
downloadsamba-581ee2e4c32a1ddb77f4fccb6a5ade610998d47e.tar.gz
samba-581ee2e4c32a1ddb77f4fccb6a5ade610998d47e.tar.xz
samba-581ee2e4c32a1ddb77f4fccb6a5ade610998d47e.zip
ctdb-tools/ctdb: Unlock records before closing tdb database
Now freeing ctdb_db context will close the tdb database. So make sure all the locks are released (by freeing record handles or memory context from which record handles are allocated) before freeing ctdb_db context. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'ctdb')
-rw-r--r--ctdb/tools/ctdb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c
index 4afb3e7af7b..624c61c2f80 100644
--- a/ctdb/tools/ctdb.c
+++ b/ctdb/tools/ctdb.c
@@ -3842,8 +3842,8 @@ static int control_readkey(struct ctdb_context *ctdb, int argc, const char **arg
printf("Data: size:%d ptr:[%.*s]\n", (int)data.dsize, (int)data.dsize, data.dptr);
- talloc_free(ctdb_db);
talloc_free(tmp_ctx);
+ talloc_free(ctdb_db);
return 0;
}
@@ -3892,8 +3892,8 @@ static int control_writekey(struct ctdb_context *ctdb, int argc, const char **ar
}
talloc_free(h);
- talloc_free(ctdb_db);
talloc_free(tmp_ctx);
+ talloc_free(ctdb_db);
return 0;
}