dbwrap: Use talloc_zero in db_open_rbt
authorVolker Lendecke <vl@samba.org>
Thu, 29 Nov 2012 14:02:43 +0000 (15:02 +0100)
committerMichael Adam <obnox@samba.org>
Thu, 29 Nov 2012 17:27:37 +0000 (18:27 +0100)
Reviewed-by: Michael Adam <obnox@samba.org>
lib/dbwrap/dbwrap_rbt.c

index afe9974cb5c22fdc6ea7ad306d8968ea07c6bfb8..3f970865982db486fd2269dda09e105c3f018d9a 100644 (file)
@@ -480,7 +480,7 @@ struct db_context *db_open_rbt(TALLOC_CTX *mem_ctx)
 {
        struct db_context *result;
 
-       result = talloc(mem_ctx, struct db_context);
+       result = talloc_zero(mem_ctx, struct db_context);
 
        if (result == NULL) {
                return NULL;
@@ -494,7 +494,6 @@ struct db_context *db_open_rbt(TALLOC_CTX *mem_ctx)
        }
 
        result->fetch_locked = db_rbt_fetch_locked;
-       result->try_fetch_locked = NULL;
        result->traverse = db_rbt_traverse;
        result->traverse_read = db_rbt_traverse_read;
        result->get_seqnum = db_rbt_get_seqnum;
@@ -504,11 +503,8 @@ struct db_context *db_open_rbt(TALLOC_CTX *mem_ctx)
        result->exists = db_rbt_exists;
        result->wipe = db_rbt_wipe;
        result->parse_record = db_rbt_parse_record;
-       result->lock_order = 0;
        result->id = db_rbt_id;
        result->name = "dbwrap rbt";
-       result->hash_size = 0;
-       result->stored_callback = NULL;
 
        return result;
 }