diff options
Diffstat (limited to 'source4/param')
-rw-r--r-- | source4/param/loadparm.c | 8 | ||||
-rw-r--r-- | source4/param/share_classic.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c index 32aaa13b87..19f5b8b6ca 100644 --- a/source4/param/loadparm.c +++ b/source4/param/loadparm.c @@ -888,16 +888,16 @@ const char *lp_parm_string(struct loadparm_context *lp_ctx, /* Parametric option has following syntax: 'Type: option = value' */ /* Returned value is allocated in 'lp_talloc' context */ -const char **lp_parm_string_list(struct loadparm_context *lp_ctx, +const char **lp_parm_string_list(TALLOC_CTX *mem_ctx, + struct loadparm_context *lp_ctx, struct loadparm_service *service, const char *type, const char *option, const char *separator) { const char *value = lp_get_parametric(lp_ctx, service, type, option); - if (value) - return str_list_make(talloc_autofree_context(), value, - separator); + if (value != NULL) + return str_list_make(mem_ctx, value, separator); return NULL; } diff --git a/source4/param/share_classic.c b/source4/param/share_classic.c index 7a0c2873f4..ab1b4bf904 100644 --- a/source4/param/share_classic.c +++ b/source4/param/share_classic.c @@ -240,7 +240,7 @@ static const char **sclassic_string_list_option(TALLOC_CTX *mem_ctx, struct shar *val = '\0'; val++; - ret = lp_parm_string_list(global_loadparm, s, parm, val, ",;"); + ret = lp_parm_string_list(mem_ctx, global_loadparm, s, parm, val, ",;"); talloc_free(parm); return ret; } |