Real memeory leak(buildup) issue in loadparm.
authorHemanth Thummala <hemanth.thummala@nutanix.com>
Tue, 16 Feb 2016 22:44:38 +0000 (14:44 -0800)
committerKarolin Seeger <kseeger@samba.org>
Mon, 22 Feb 2016 12:48:02 +0000 (13:48 +0100)
commitfe4a09d7df184689fe05ca4b87e354a981163e1e
tree8a428f39274429ef66c0d2be10c90fbf1bfbfe1d
parent995f757d18b1300dff6d0558a7aa3b06ce4b639a
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
source3/param/loadparm.c