summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-08 23:32:18 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:48:53 +0100
commitfd88c3ca2480fabb90c0d8fc701394bb59f99481 (patch)
tree5b00876234b955b5378c223bcb202f1e4f3151ff
parent5f9aeca0d66c55896a0ab20cf73dda4ca4b22a39 (diff)
downloadsamba-fd88c3ca2480fabb90c0d8fc701394bb59f99481.tar.gz
samba-fd88c3ca2480fabb90c0d8fc701394bb59f99481.tar.bz2
samba-fd88c3ca2480fabb90c0d8fc701394bb59f99481.zip
r26348: Avoid use of autofree context.
(This used to be commit eebcf7e1b06ca48cc53bdd12efa01fcf0cff8aa3)
-rw-r--r--source4/auth/auth.c6
-rw-r--r--source4/param/loadparm.c8
-rw-r--r--source4/param/share_classic.c2
3 files changed, 8 insertions, 8 deletions
diff --git a/source4/auth/auth.c b/source4/auth/auth.c
index 8e788ccca5..0068c3bde7 100644
--- a/source4/auth/auth.c
+++ b/source4/auth/auth.c
@@ -422,13 +422,13 @@ NTSTATUS auth_context_create(TALLOC_CTX *mem_ctx,
const char **auth_methods = NULL;
switch (lp_server_role(lp_ctx)) {
case ROLE_STANDALONE:
- auth_methods = lp_parm_string_list(lp_ctx, NULL, "auth methods", "standalone", NULL);
+ auth_methods = lp_parm_string_list(mem_ctx, lp_ctx, NULL, "auth methods", "standalone", NULL);
break;
case ROLE_DOMAIN_MEMBER:
- auth_methods = lp_parm_string_list(lp_ctx, NULL, "auth methods", "member server", NULL);
+ auth_methods = lp_parm_string_list(mem_ctx, lp_ctx, NULL, "auth methods", "member server", NULL);
break;
case ROLE_DOMAIN_CONTROLLER:
- auth_methods = lp_parm_string_list(lp_ctx, NULL, "auth methods", "domain controller", NULL);
+ auth_methods = lp_parm_string_list(mem_ctx, lp_ctx, NULL, "auth methods", "domain controller", NULL);
break;
}
return auth_context_create_methods(mem_ctx, auth_methods, ev, msg, lp_ctx, auth_ctx);
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;
}