summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNadezhda Ivanova <nadezhda.ivanova@postpath.com>2009-12-18 17:57:08 +0200
committerNadezhda Ivanova <nadezhda.ivanova@postpath.com>2009-12-18 17:57:08 +0200
commitea365af4f597fd1fb596018920040a6af49144ec (patch)
treeaabd17758271158e7c761b9b4db0888aacab35eb
parent39616c0ea2e2268d7b403bdb5d1a1250c7e44653 (diff)
downloadsamba-ea365af4f597fd1fb596018920040a6af49144ec.tar.gz
samba-ea365af4f597fd1fb596018920040a6af49144ec.tar.bz2
samba-ea365af4f597fd1fb596018920040a6af49144ec.zip
Added freeing a successful req so it doesnt croud the ldb context
-rw-r--r--source4/ldap_server/ldap_backend.c6
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;