1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-03 04:22:09 +03:00

r26348: Avoid use of autofree context.

(This used to be commit eebcf7e1b0)
This commit is contained in:
Jelmer Vernooij
2007-12-08 23:32:18 +01:00
committed by Stefan Metzmacher
parent 5f9aeca0d6
commit fd88c3ca24
3 changed files with 8 additions and 8 deletions

View File

@ -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);

View File

@ -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;
}

View File

@ -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;
}