summaryrefslogtreecommitdiff
path: root/source4/rpc_server
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-12-04 17:45:38 +1100
committerAndrew Tridgell <tridge@samba.org>2009-12-04 17:49:19 +1100
commitced3eef776dd44d0f3e9219f77e2660f9e49fa92 (patch)
tree727b3afc5c6d8ed6037ffd51532e06dfd214ea96 /source4/rpc_server
parent4f6d5d0b865a077185e2441d401709325c3e7304 (diff)
downloadsamba-ced3eef776dd44d0f3e9219f77e2660f9e49fa92.tar.gz
samba-ced3eef776dd44d0f3e9219f77e2660f9e49fa92.tar.bz2
samba-ced3eef776dd44d0f3e9219f77e2660f9e49fa92.zip
s4-drsutil: fixed a memory leak in samdb_search_count
In general functions that don't return any memory should not take a memory context. Otherwise it is too easy to have a bug like this where memory is leaked
Diffstat (limited to 'source4/rpc_server')
-rw-r--r--source4/rpc_server/samr/dcesrv_samr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c
index 725ecba21f..1621003ea3 100644
--- a/source4/rpc_server/samr/dcesrv_samr.c
+++ b/source4/rpc_server/samr/dcesrv_samr.c
@@ -518,12 +518,12 @@ static NTSTATUS dcesrv_samr_info_DomGeneralInformation(struct samr_domain_state
}
/* No users in BUILTIN, and the LOCAL group types are only in builtin, and the global group type is never in BUILTIN */
- info->num_users = samdb_search_count(state->sam_ctx, mem_ctx, state->domain_dn,
+ info->num_users = samdb_search_count(state->sam_ctx, state->domain_dn,
"(objectClass=user)");
- info->num_groups = samdb_search_count(state->sam_ctx, mem_ctx, state->domain_dn,
+ info->num_groups = samdb_search_count(state->sam_ctx, state->domain_dn,
"(&(objectClass=group)(sAMAccountType=%u))",
ATYPE_GLOBAL_GROUP);
- info->num_aliases = samdb_search_count(state->sam_ctx, mem_ctx, state->domain_dn,
+ info->num_aliases = samdb_search_count(state->sam_ctx, state->domain_dn,
"(&(objectClass=group)(sAMAccountType=%u))",
ATYPE_LOCAL_GROUP);