summaryrefslogtreecommitdiff
path: root/source4/rpc_server/drsuapi
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-08-06 03:01:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:01:29 -0500
commit58d9f6ed9dc054f4046be660353f1fb627145911 (patch)
tree892c345ed404867904ea36ded7f4c917c58b60b6 /source4/rpc_server/drsuapi
parentb351641c6ebcffd89c8e5e9cdae0f92528f12e05 (diff)
downloadsamba-58d9f6ed9dc054f4046be660353f1fb627145911.tar.gz
samba-58d9f6ed9dc054f4046be660353f1fb627145911.tar.bz2
samba-58d9f6ed9dc054f4046be660353f1fb627145911.zip
r24246: Avoid the annoying 'probable memory leak in ldb' messages, by fixing
some issues in the NBT server (this was a false positive, but easily worked around) and DRSUAPI server. We should take care not to use the ldb_context as a talloc pool, and to always ensure that any results from ldb_search() are moved off that pool with talloc_steal or talloc_free(). To work around the issue in provision, for which I can find no fault (other than a lot of work being done in provision), I've moved the detector trigger to 400 additional blocks. This fixes Bug #4810 by <mwallnoefer@yahoo.de> Andrew Bartlett (This used to be commit 42bcf856203ae3cf43130519904828a143ac8d18)
Diffstat (limited to 'source4/rpc_server/drsuapi')
-rw-r--r--source4/rpc_server/drsuapi/dcesrv_drsuapi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/rpc_server/drsuapi/dcesrv_drsuapi.c b/source4/rpc_server/drsuapi/dcesrv_drsuapi.c
index f315cae102..0c22e856f2 100644
--- a/source4/rpc_server/drsuapi/dcesrv_drsuapi.c
+++ b/source4/rpc_server/drsuapi/dcesrv_drsuapi.c
@@ -556,7 +556,7 @@ static WERROR dcesrv_drsuapi_DsGetDomainControllerInfo_1(struct drsuapi_bind_sta
struct ldb_dn *domain_dn;
struct ldb_result *res_domain;
struct ldb_result *res_account;
- struct ldb_dn *ntds_dn = ldb_dn_copy(b_state->sam_ctx, res->msgs[i]->dn);
+ struct ldb_dn *ntds_dn = ldb_dn_copy(mem_ctx, res->msgs[i]->dn);
struct ldb_dn *ref_dn
= ldb_msg_find_attr_as_dn(b_state->sam_ctx,
@@ -617,9 +617,9 @@ static WERROR dcesrv_drsuapi_DsGetDomainControllerInfo_1(struct drsuapi_bind_sta
struct ldb_dn *domain_dn;
struct ldb_result *res_domain;
struct ldb_result *res_account;
- struct ldb_dn *ntds_dn = ldb_dn_copy(b_state->sam_ctx, res->msgs[i]->dn);
+ struct ldb_dn *ntds_dn = ldb_dn_copy(mem_ctx, res->msgs[i]->dn);
struct ldb_result *res_ntds;
- struct ldb_dn *site_dn = ldb_dn_copy(b_state->sam_ctx, res->msgs[i]->dn);
+ struct ldb_dn *site_dn = ldb_dn_copy(mem_ctx, res->msgs[i]->dn);
struct ldb_result *res_site;
struct ldb_dn *ref_dn
= ldb_msg_find_attr_as_dn(b_state->sam_ctx,