From 04ae7b85ea24310cbef34ac20a0b82bcdb714192 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Thu, 27 Mar 2008 18:00:25 +0100 Subject: dbwrap: fix dbwrap_trans_[delete|store]() to stop when transaction_start() failed. Michael (This used to be commit ab0aaed907fef233998ff0841d30eabef3263ee8) --- source3/lib/dbwrap_util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source3/lib/dbwrap_util.c b/source3/lib/dbwrap_util.c index 550e5c482b..1572f01723 100644 --- a/source3/lib/dbwrap_util.c +++ b/source3/lib/dbwrap_util.c @@ -127,6 +127,7 @@ int dbwrap_trans_store(struct db_context *db, TDB_DATA key, TDB_DATA dbuf, res = db->transaction_start(db); if (res != 0) { DEBUG(5, ("transaction_start failed\n")); + return res; } rec = db->fetch_locked(db, talloc_tos(), key); @@ -166,6 +167,7 @@ int dbwrap_trans_delete(struct db_context *db, TDB_DATA key) res = db->transaction_start(db); if (res != 0) { DEBUG(5, ("transaction_start failed\n")); + return res; } rec = db->fetch_locked(db, talloc_tos(), key); -- cgit