Real memeory leak(buildup) issue in loadparm.
commitf37cb215c81968e7f75cb93129d05175ecb6512a
authorHemanth Thummala <hemanth.thummala@nutanix.com>
Tue, 16 Feb 2016 22:44:38 +0000 (16 14:44 -0800)
committerKarolin Seeger <kseeger@samba.org>
Mon, 22 Feb 2016 13:26:23 +0000 (22 14:26 +0100)
treeeea5bc0e9bf109edb80691da1fb7bbc4c3b41d04
parent89b13fea7bb91afe4159c58b8b2cabdfc7a18818
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-3-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-3-test): Mon Feb 22 14:26:23 CET 2016 on sn-devel-104
source3/param/loadparm.c