ctdb-daemon: Talloc tdb_wrap off ctdb_db_context
authorAmitay Isaacs <amitay@gmail.com>
Sun, 20 Apr 2014 10:52:03 +0000 (20:52 +1000)
committerMichael Adam <obnox@samba.org>
Wed, 23 Apr 2014 12:49:07 +0000 (14:49 +0200)
This will ensure that when ctdb_db is freed, it will close the tdb
database.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
ctdb/server/ctdb_ltdb_server.c

index fe8636949d53d7a0cc3e5dd55a65dcdb8872f8f3..19c6a82b9c8cb1337159b6db05e4a138ec1cdf45 100644 (file)
@@ -838,7 +838,7 @@ static int ctdb_local_attach(struct ctdb_context *ctdb, const char *db_name,
        }
 
 again:
-       ctdb_db->ltdb = tdb_wrap_open(ctdb, ctdb_db->db_path, 
+       ctdb_db->ltdb = tdb_wrap_open(ctdb_db, ctdb_db->db_path,
                                      ctdb->tunable.database_hash_size, 
                                      tdb_flags, 
                                      O_CREAT|O_RDWR, mode);