]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib: Micro-optimization for db_tdb_do_locked()
authorVolker Lendecke <vl@samba.org>
Tue, 13 Aug 2019 12:43:08 +0000 (14:43 +0200)
committerJeremy Allison <jra@samba.org>
Mon, 19 Aug 2019 23:14:38 +0000 (23:14 +0000)
We don't need the tdb lock for the talloc_free(buf) anymore

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
lib/dbwrap/dbwrap_tdb.c

index 00d283c66e6c6ea0e7b6487f25fcb3bb373681a4..eb08a01a161551e3c7d2aad10fe750ec7bf56d68 100644 (file)
@@ -218,10 +218,10 @@ static NTSTATUS db_tdb_do_locked(struct db_context *db, TDB_DATA key,
 
        fn(&rec, private_data);
 
-       talloc_free(buf);
-
        tdb_chainunlock(ctx->wtdb->tdb, key);
 
+       talloc_free(buf);
+
        return NT_STATUS_OK;
 }