1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

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>
This commit is contained in:
Amitay Isaacs 2014-04-23 11:44:20 +10:00 committed by Michael Adam
parent db0a1df25c
commit 581ee2e4c3

View File

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