summaryrefslogtreecommitdiff
path: root/lib/dbwrap
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2019-08-13 14:43:08 +0200
committerJeremy Allison <jra@samba.org>2019-08-19 23:14:38 +0000
commit58b5bfba11a66d250267efe901dfba76f82005f8 (patch)
tree46e9eef04149ef999e57a63054a1d4362457cbec /lib/dbwrap
parent7d96ed632260d7246f1729ee7efb696abc29fd6c (diff)
downloadsamba-58b5bfba11a66d250267efe901dfba76f82005f8.tar.gz
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 <vl@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
Diffstat (limited to 'lib/dbwrap')
-rw-r--r--lib/dbwrap/dbwrap_tdb.c4
1 files changed, 2 insertions, 2 deletions
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;
}