summaryrefslogtreecommitdiffstats
path: root/source3
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-07-26 12:19:58 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-09-08 15:09:54 +0200
commite16f004dc0b04c45cd5b16de47968094575d2a38 (patch)
treea20a563db735ef2bd7548421568d919dcc6c9991 /source3
parent38198e8f3e07351af88db4b931271977e23e13fd (diff)
downloadsamba-e16f004dc0b04c45cd5b16de47968094575d2a38.tar.gz
samba-e16f004dc0b04c45cd5b16de47968094575d2a38.tar.xz
samba-e16f004dc0b04c45cd5b16de47968094575d2a38.zip
s3-loadparm: fixed a memory leak in parametric options
before we memset the Globals structure we need to free any global parametrics Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/param/loadparm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 305ff2cec95..21fa662141b 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -310,6 +310,7 @@ static void set_allowed_client_auth(void);
static void add_to_file_list(const char *fname, const char *subfname);
static bool lp_set_cmdline_helper(const char *pszParmName, const char *pszParmValue, bool store_values);
+static void free_param_opts(struct parmlist_entry **popts);
static const struct enum_list enum_protocol[] = {
{PROTOCOL_SMB2_02, "SMB2"}, /* for now keep PROTOCOL_SMB2_02 */
@@ -4605,6 +4606,7 @@ static void free_parameters_by_snum(int snum)
*/
static void free_global_parameters(void)
{
+ free_param_opts(&Globals.param_opt);
free_parameters_by_snum(GLOBAL_SECTION_SNUM);
}
@@ -5420,7 +5422,6 @@ static bool do_section(const char *pszSectionName, void *userdata);
static void init_copymap(struct loadparm_service *pservice);
static bool hash_a_service(const char *name, int number);
static void free_service_byindex(int iService);
-static void free_param_opts(struct parmlist_entry **popts);
static void show_parameter(int parmIndex);
static bool is_synonym_of(int parm1, int parm2, bool *inverse);