From 04e3c4bea2d15aecd88e318573fe563c722dbc28 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 29 May 2018 16:14:45 +1200 Subject: [PATCH] ldb: Reset error string before running prepare_commit() hook This ensures that the error string returned to the caller reflects a failure in this call. Signed-off-by: Andrew Bartlett Reviewed-by: Garming Sam --- lib/ldb/common/ldb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ldb/common/ldb.c b/lib/ldb/common/ldb.c index 2249089d087..5525e70b465 100644 --- a/lib/ldb/common/ldb.c +++ b/lib/ldb/common/ldb.c @@ -425,6 +425,8 @@ int ldb_transaction_prepare_commit(struct ldb_context *ldb) return LDB_SUCCESS; } + ldb_reset_err_string(ldb); + status = next_module->ops->prepare_commit(next_module); if (status != LDB_SUCCESS) { ldb->transaction_active--; -- 2.47.2