From: Volker Lendecke Date: Tue, 13 Aug 2019 12:43:08 +0000 (+0200) Subject: lib: Micro-optimization for db_tdb_do_locked() X-Git-Tag: tdb-1.4.2~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58b5bfba11a66d250267efe901dfba76f82005f8;p=thirdparty%2Fsamba.git lib: Micro-optimization for db_tdb_do_locked() We don't need the tdb lock for the talloc_free(buf) anymore Signed-off-by: Volker Lendecke Reviewed-by: Ralph Böhme --- diff --git a/lib/dbwrap/dbwrap_tdb.c b/lib/dbwrap/dbwrap_tdb.c index 00d283c66e6..eb08a01a161 100644 --- a/lib/dbwrap/dbwrap_tdb.c +++ b/lib/dbwrap/dbwrap_tdb.c @@ -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; }