diff options
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/debug.c | 6 | ||||
-rw-r--r-- | source3/lib/util_str.c | 13 |
2 files changed, 6 insertions, 13 deletions
diff --git a/source3/lib/debug.c b/source3/lib/debug.c index 51bb0d7541..9ff267b607 100644 --- a/source3/lib/debug.c +++ b/source3/lib/debug.c @@ -460,14 +460,14 @@ bool debug_parse_levels(const char *params_str) if (AllowDebugChange == False) return True; - params = str_list_make(params_str, NULL); + params = str_list_make(talloc_tos(), params_str, NULL); if (debug_parse_params(params)) { debug_dump_status(5); - str_list_free(¶ms); + TALLOC_FREE(params); return True; } else { - str_list_free(¶ms); + TALLOC_FREE(params); return False; } } diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c index 05be7ca1e4..fb3392f041 100644 --- a/source3/lib/util_str.c +++ b/source3/lib/util_str.c @@ -1902,19 +1902,12 @@ static char **str_list_make_internal(TALLOC_CTX *mem_ctx, const char *string, return list; } -char **str_list_make_talloc(TALLOC_CTX *mem_ctx, - const char *string, - const char *sep) +char **str_list_make(TALLOC_CTX *mem_ctx, const char *string, const char *sep) { return str_list_make_internal(mem_ctx, string, sep); } -char **str_list_make(const char *string, const char *sep) -{ - return str_list_make_internal(NULL, string, sep); -} - -bool str_list_copy(char ***dest, const char **src) +bool str_list_copy(TALLOC_CTX *mem_ctx, char ***dest, const char **src) { char **list; int i, num; @@ -1928,7 +1921,7 @@ bool str_list_copy(char ***dest, const char **src) num += 1; } - list = TALLOC_ARRAY(NULL, char *, num+1); + list = TALLOC_ARRAY(mem_ctx, char *, num+1); if (list == NULL) { return false; } |