summaryrefslogtreecommitdiff
path: root/lib/dbwrap
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2017-07-26 15:12:21 +0200
committerJeremy Allison <jra@samba.org>2017-08-16 00:27:10 +0200
commitef2de247c1d0887283cb8dfc25d9e48252a2c9e2 (patch)
tree1db453149d54ab3437fea66f04d283b25e52fd60 /lib/dbwrap
parent2ddf8e0abc235f396d4b70f9cb22f55d21dffdc5 (diff)
downloadsamba-ef2de247c1d0887283cb8dfc25d9e48252a2c9e2.tar.gz
dbwrap: Simplify dbwrap_trans_delete
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'lib/dbwrap')
-rw-r--r--lib/dbwrap/dbwrap_util.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/dbwrap/dbwrap_util.c b/lib/dbwrap/dbwrap_util.c
index acd3c1837bc..cb98d742186 100644
--- a/lib/dbwrap/dbwrap_util.c
+++ b/lib/dbwrap/dbwrap_util.c
@@ -376,22 +376,13 @@ NTSTATUS dbwrap_trans_store(struct db_context *db, TDB_DATA key, TDB_DATA dbuf,
static NTSTATUS dbwrap_delete_action(struct db_context * db, void *private_data)
{
NTSTATUS status;
- struct db_record *rec;
TDB_DATA *key = (TDB_DATA *)private_data;
- rec = dbwrap_fetch_locked(db, talloc_tos(), *key);
- if (rec == NULL) {
- DEBUG(5, ("fetch_locked failed\n"));
- return NT_STATUS_NO_MEMORY;
- }
-
- status = dbwrap_record_delete(rec);
+ status = dbwrap_delete(db, *key);
if (!NT_STATUS_IS_OK(status)) {
DBG_INFO("dbwrap_record_delete returned %s\n",
nt_errstr(status));
}
-
- talloc_free(rec);
return status;
}