diff options
author | Volker Lendecke <vl@samba.org> | 2017-07-26 15:10:55 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2017-08-16 00:27:10 +0200 |
commit | 2ddf8e0abc235f396d4b70f9cb22f55d21dffdc5 (patch) | |
tree | 5b893bc301372d6e5d59263428b89e73a1c05fae /lib/dbwrap | |
parent | b01b7c9ef9ef45205c6eb49a5959d8718559fd79 (diff) | |
download | samba-2ddf8e0abc235f396d4b70f9cb22f55d21dffdc5.tar.gz |
dbwrap: Simplify dbwrap_trans_store
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.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/dbwrap/dbwrap_util.c b/lib/dbwrap/dbwrap_util.c index c7971a95b85..acd3c1837bc 100644 --- a/lib/dbwrap/dbwrap_util.c +++ b/lib/dbwrap/dbwrap_util.c @@ -344,24 +344,17 @@ struct dbwrap_store_context { static NTSTATUS dbwrap_store_action(struct db_context *db, void *private_data) { - struct db_record *rec = NULL; NTSTATUS status; struct dbwrap_store_context *store_ctx; store_ctx = (struct dbwrap_store_context *)private_data; - rec = dbwrap_fetch_locked(db, talloc_tos(), *(store_ctx->key)); - if (rec == NULL) { - DEBUG(5, ("fetch_locked failed\n")); - return NT_STATUS_NO_MEMORY; - } - - status = dbwrap_record_store(rec, *(store_ctx->dbuf), store_ctx->flag); + status = dbwrap_store(db, *(store_ctx->key), *(store_ctx->dbuf), + store_ctx->flag); if (!NT_STATUS_IS_OK(status)) { DEBUG(5, ("store returned %s\n", nt_errstr(status))); } - TALLOC_FREE(rec); return status; } |