s4-dsdb: Add mem_ctx argument to samdb_ntds_settings_dn
authorAndrew Bartlett <abartlet@samba.org>
Tue, 14 Aug 2012 06:08:47 +0000 (16:08 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 14 Aug 2012 08:05:14 +0000 (10:05 +0200)
commit956678685325a79a315f4ef19c0d834fd1747e4c
tree62b89848fbf552187a07d1d520702112f3b4ac45
parent0f2a87b547be43b4764c48350fd03ff22e086806
s4-dsdb: Add mem_ctx argument to samdb_ntds_settings_dn

As this value is calculated new each time, we need to give it a context to live on.

If the value is the forced value during provision, a reference is taken.

This was responsible for the memory leak in the replication process.  In the
example I was given, this DN appeared in memory 13596 times!

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Aug 14 10:05:14 CEST 2012 on sn-devel-104
14 files changed:
source4/dsdb/common/util.c
source4/dsdb/kcc/kcc_connection.c
source4/dsdb/kcc/kcc_periodic.c
source4/dsdb/kcc/kcc_topology.c
source4/dsdb/repl/drepl_fsmo.c
source4/dsdb/repl/drepl_partitions.c
source4/dsdb/repl/drepl_ridalloc.c
source4/dsdb/samdb/ldb_modules/objectclass.c
source4/dsdb/samdb/ldb_modules/ridalloc.c
source4/dsdb/samdb/ldb_modules/rootdse.c
source4/dsdb/samdb/ldb_modules/util.c
source4/dsdb/schema/schema_init.c
source4/rpc_server/drsuapi/dcesrv_drsuapi.c
source4/rpc_server/drsuapi/getncchanges.c