From: Andrew Bartlett Date: Tue, 29 May 2018 04:14:45 +0000 (+1200) Subject: ldb: Reset error string before running prepare_commit() hook X-Git-Tag: ldb-1.4.0~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04e3c4bea2d15aecd88e318573fe563c722dbc28;p=thirdparty%2Fsamba.git 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 --- 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--;