[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha2-1394-g95314f2

Andrew Bartlett abartlet at samba.org
Sat Mar 29 00:27:19 GMT 2008


The branch, v4-0-test has been updated
       via  95314f29a9cf83db71d37e68728bfb5009fce60d (commit)
      from  6e863e5fecf83f95ddc5b0149cf7093e2a6a1b07 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test


- Log -----------------------------------------------------------------
commit 95314f29a9cf83db71d37e68728bfb5009fce60d
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sat Mar 29 11:18:00 2008 +1100

    Fix some valgrind issues.
    
    These small changes seem to fix some of the early issues in 'make
    valgrindtest'
    
    Previously, the subtree_delete code didn't pass on the timeout,
    leaving it uninitialised.
    
    The ldap_server/ldap_backend.c change tidies up the talloc hierarchy a
    bit.
    
    Andrew Bartlett

-----------------------------------------------------------------------

Summary of changes:
 source/dsdb/samdb/ldb_modules/subtree_delete.c |    6 ++++++
 source/ldap_server/ldap_backend.c              |    6 +++---
 2 files changed, 9 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/dsdb/samdb/ldb_modules/subtree_delete.c b/source/dsdb/samdb/ldb_modules/subtree_delete.c
index 56ae7b2..9c332d2 100644
--- a/source/dsdb/samdb/ldb_modules/subtree_delete.c
+++ b/source/dsdb/samdb/ldb_modules/subtree_delete.c
@@ -160,6 +160,12 @@ static int subtree_delete(struct ldb_module *module, struct ldb_request *req)
 		return ret;
 	}
 
+	ret = ldb_set_timeout_from_prev_req(module->ldb, req, new_req);
+
+	if (ret != LDB_SUCCESS) {
+		return ret;
+	}
+
 	ac->search_req = new_req;
 	if (req == NULL) {
 		ldb_oom(ac->module->ldb);
diff --git a/source/ldap_server/ldap_backend.c b/source/ldap_server/ldap_backend.c
index 346aaca..8b1c3ce 100644
--- a/source/ldap_server/ldap_backend.c
+++ b/source/ldap_server/ldap_backend.c
@@ -216,9 +216,6 @@ static NTSTATUS ldapsrv_SearchRequest(struct ldapsrv_call *call)
 	lreq = talloc(local_ctx, struct ldb_request);
 	NT_STATUS_HAVE_NO_MEMORY(lreq);
 
-	res = talloc_zero(local_ctx, struct ldb_result);
-	NT_STATUS_HAVE_NO_MEMORY(res);
-	
 	lreq->operation = LDB_SEARCH;
 	lreq->op.search.base = basedn;
 	lreq->op.search.scope = scope;
@@ -242,6 +239,9 @@ static NTSTATUS ldapsrv_SearchRequest(struct ldapsrv_call *call)
 		}
 	}
 
+	res = talloc_zero(lreq, struct ldb_result);
+	NT_STATUS_HAVE_NO_MEMORY(res);
+	
 	lreq->context = res;
 	lreq->callback = ldb_search_default_callback;
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list