svn commit: samba r20125 - in
branches/SAMBA_4_0/source/lib/ldb/ldb_ildap: .
metze at samba.org
metze at samba.org
Tue Dec 12 18:14:31 GMT 2006
Author: metze
Date: 2006-12-12 18:14:31 +0000 (Tue, 12 Dec 2006)
New Revision: 20125
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=20125
Log:
fix some ugly mem leaks in the ldb_ildb backend
metze
Modified:
branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c 2006-12-12 17:38:42 UTC (rev 20124)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/ldb_ildap.c 2006-12-12 18:14:31 UTC (rev 20125)
@@ -329,7 +329,7 @@
struct ildb_context *ildb_ac;
struct ldb_handle *h;
- h = talloc_zero(ildb->ldap, struct ldb_handle);
+ h = talloc_zero(req, struct ldb_handle);
if (h == NULL) {
ldb_set_errstring(ildb->module->ldb, "Out of Memory");
return NULL;
@@ -373,6 +373,7 @@
ldb_set_errstring(ildb->module->ldb, "async send request failed");
return LDB_ERR_OPERATIONS_ERROR;
}
+ ildb_ac->req = talloc_steal(ildb_ac, req);
if (!req->conn) {
ldb_set_errstring(ildb->module->ldb, "connection to remote LDAP server dropped?");
@@ -389,7 +390,6 @@
req->async.fn = ildb_callback;
req->async.private_data = ildb_ac->handle;
- ildb_ac->req = talloc_move(ildb_ac, &req);
return LDB_SUCCESS;
}
@@ -431,7 +431,7 @@
return LDB_ERR_OPERATIONS_ERROR;
}
- msg = new_ldap_message(ildb);
+ msg = new_ldap_message(req);
if (msg == NULL) {
ldb_set_errstring(module->ldb, "Out of Memory");
return LDB_ERR_OPERATIONS_ERROR;
@@ -487,7 +487,7 @@
return ildb_request_noop(ildb, req);
}
- msg = new_ldap_message(ildb->ldap);
+ msg = new_ldap_message(req);
if (msg == NULL) {
return LDB_ERR_OPERATIONS_ERROR;
}
@@ -537,7 +537,7 @@
return ildb_request_noop(ildb, req);
}
- msg = new_ldap_message(ildb->ldap);
+ msg = new_ldap_message(req);
if (msg == NULL) {
return LDB_ERR_OPERATIONS_ERROR;
}
@@ -585,7 +585,7 @@
return ildb_request_noop(ildb, req);
}
- msg = new_ldap_message(ildb->ldap);
+ msg = new_ldap_message(req);
if (msg == NULL) {
return LDB_ERR_OPERATIONS_ERROR;
}
@@ -616,7 +616,7 @@
return ildb_request_noop(ildb, req);
}
- msg = new_ldap_message(ildb->ldap);
+ msg = new_ldap_message(req);
if (msg == NULL) {
return LDB_ERR_OPERATIONS_ERROR;
}
More information about the samba-cvs
mailing list