Real memeory leak(buildup) issue in loadparm.
authorHemanth Thummala <hemanth.thummala@nutanix.com>
Tue, 16 Feb 2016 22:44:38 +0000 (14:44 -0800)
committerJeremy Allison <jra@samba.org>
Wed, 17 Feb 2016 21:30:25 +0000 (22:30 +0100)
commit03081c2c1484504bdcc0e111b2df95e073c1c166
tree4903c29523a0d0bbc31dcf5ef4e7b9d816d79dd8
parent7eab9e5fbd40e336d0345bea63b1a2541894ac64
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
source3/param/loadparm.c