From 83871d2642378d1cd0a8bad0a2d5a9a92cb1cfe8 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 15 Oct 2010 22:27:10 -0700 Subject: Don't arbitrarily clean all parametric options in add_a_service(), that is called from many places, not just smb.conf processing. Only clean parametric options when doing actual smb.conf reading (or registry equivalent). Michael Adams, Volker, Metze, please check. Jeremy. Autobuild-User: Jeremy Allison Autobuild-Date: Sat Oct 16 06:46:19 UTC 2010 on sn-devel-104 --- source3/param/loadparm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/param/loadparm.c') diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index f9a908dce9..8dadebfa89 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -6277,9 +6277,6 @@ static int add_a_service(const struct service *pservice, const char *name) if (name) { i = getservicebyname(name, NULL); if (i >= 0) { - /* Clean all parametric options for service */ - /* They will be added during parsing again */ - free_param_opts(&ServicePtrs[i]->param_opt); return (i); } } @@ -8111,6 +8108,9 @@ static bool do_section(const char *pszSectionName, void *userdata) DEBUG(0, ("Failed to add a new service\n")); return (False); } + /* Clean all parametric options for service */ + /* They will be added during parsing again */ + free_param_opts(&ServicePtrs[iServiceIndex]->param_opt); } return (bRetval); -- cgit