From 74dfee916f1e7f9ad01c93bda94e1fba9b89be9d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 4 Dec 2007 17:23:19 -0800 Subject: Remove tok pstring from util_str.c Do we even make rpctorture anymore ? Jeremy. (This used to be commit fecc3cc45af6145fad9a0570e6cae8422bd2443d) --- source3/lib/util_str.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'source3/lib/util_str.c') diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c index 7cd0f78439..01e81e48c3 100644 --- a/source3/lib/util_str.c +++ b/source3/lib/util_str.c @@ -2053,7 +2053,8 @@ static char **str_list_make_internal(TALLOC_CTX *mem_ctx, const char *str; char *s; int num, lsize; - pstring tok; + char *tok; + TALLOC_CTX *frame = NULL; if (!string || !*string) return NULL; @@ -2072,7 +2073,8 @@ static char **str_list_make_internal(TALLOC_CTX *mem_ctx, list = NULL; str = s; - while (next_token(&str, tok, sep, sizeof(tok))) { + frame = talloc_stackframe(); + while (next_token_talloc(frame, &str, &tok, sep)) { if (num == lsize) { lsize += S_LIST_ABS; if (mem_ctx) { @@ -2094,6 +2096,7 @@ static char **str_list_make_internal(TALLOC_CTX *mem_ctx, } else { SAFE_FREE(s); } + TALLOC_FREE(frame); return NULL; } else { list = rlist; @@ -2116,12 +2119,15 @@ static char **str_list_make_internal(TALLOC_CTX *mem_ctx, } else { SAFE_FREE(s); } + TALLOC_FREE(frame); return NULL; } num++; } + TALLOC_FREE(frame); + if (mem_ctx) { TALLOC_FREE(s); } else { -- cgit