From 58b5bfba11a66d250267efe901dfba76f82005f8 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 13 Aug 2019 14:43:08 +0200 Subject: lib: Micro-optimization for db_tdb_do_locked() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We don't need the tdb lock for the talloc_free(buf) anymore Signed-off-by: Volker Lendecke Reviewed-by: Ralph Böhme --- lib/dbwrap/dbwrap_tdb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/dbwrap') 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; } -- cgit v1.2.1