Real memeory leak(buildup) issue in loadparm.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11740
As part of reload services, unused service ptr structures are getting
unloaded without actually freeingup the memory associated to them.
Made changes to freeup those allocations on unload. On reload, reuse the
slots in ServicePtr global array instead of extending the array with
holes.
Also we should mark shares like IPC$ as auto loaded as they never be
exposed to users.
Signed-off-by: Hemanth Thummala <hemanth.thummala@nutanix.com>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Feb 17 22:30:25 CET 2016 on sn-devel-144
(cherry picked from commit
03081c2c1484504bdcc0e111b2df95e073c1c166)
Autobuild-User(v4-2-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-2-test): Mon Feb 22 13:48:02 CET 2016 on sn-devel-104