summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-12-04 17:23:19 -0800
committerJeremy Allison <jra@samba.org>2007-12-04 17:23:19 -0800
commit74dfee916f1e7f9ad01c93bda94e1fba9b89be9d (patch)
tree28a9947ca609d9b715ad6e5236cafdc92cbeeb09 /source3/lib
parent755051b569762c13f8f4b4e52fa1183108a4e466 (diff)
downloadsamba-74dfee916f1e7f9ad01c93bda94e1fba9b89be9d.tar.gz
samba-74dfee916f1e7f9ad01c93bda94e1fba9b89be9d.tar.bz2
samba-74dfee916f1e7f9ad01c93bda94e1fba9b89be9d.zip
Remove tok pstring from util_str.c
Do we even make rpctorture anymore ? Jeremy. (This used to be commit fecc3cc45af6145fad9a0570e6cae8422bd2443d)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util_str.c10
1 files changed, 8 insertions, 2 deletions
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 {