diff options
-rw-r--r-- | source4/ldap_server/ldap_backend.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/ldap_server/ldap_backend.c b/source4/ldap_server/ldap_backend.c index d983a54261..689fd31141 100644 --- a/source4/ldap_server/ldap_backend.c +++ b/source4/ldap_server/ldap_backend.c @@ -206,9 +206,11 @@ static int ldb_mod_req_with_controls(struct ldb_context *ldb, } if (ret == LDB_SUCCESS) { - return ldb_transaction_commit(ldb); + ret = ldb_transaction_commit(ldb); + } + else { + ldb_transaction_cancel(ldb); } - ldb_transaction_cancel(ldb); talloc_free(req); return ret; |