summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarolin Seeger <kseeger@samba.org>2008-08-27 10:36:58 +0200
committerKarolin Seeger <kseeger@samba.org>2008-08-27 10:36:58 +0200
commit1a6d3ceab272f556398fd1759d45d7efbac005c4 (patch)
treef16da954616760e0a34c8b8241b157814ec1491d
parent2382ef310073e9c9a3a15bff987d7baf8f158ff4 (diff)
downloadsamba-1a6d3ceab272f556398fd1759d45d7efbac005c4.tar.gz
Revert "Fix bug 5698 - mixup of TALLOC/malloc. Spotted by Douglas Wegscheid <Douglas_E_Wegscheid@whirlpool.com>."
This reverts commit 3c205320cd1eb19ed275572f975487e92c611f13.
-rw-r--r--source/lib/util_str.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/lib/util_str.c b/source/lib/util_str.c
index a2458c88b60..c36d512239c 100644
--- a/source/lib/util_str.c
+++ b/source/lib/util_str.c
@@ -2006,7 +2006,6 @@ bool str_list_sub_basic( char **list, const char *smb_name,
bool str_list_substitute(char **list, const char *pattern, const char *insert)
{
- TALLOC_CTX *ctx = list;
char *p, *s, *t;
ssize_t ls, lp, li, ld, i, d;
@@ -2029,7 +2028,7 @@ bool str_list_substitute(char **list, const char *pattern, const char *insert)
t = *list;
d = p -t;
if (ld) {
- t = TALLOC_ARRAY(ctx, char, ls +ld +1);
+ t = (char *) SMB_MALLOC(ls +ld +1);
if (!t) {
DEBUG(0,("str_list_substitute: "
"Unable to allocate memory"));
@@ -2037,7 +2036,7 @@ bool str_list_substitute(char **list, const char *pattern, const char *insert)
}
memcpy(t, *list, d);
memcpy(t +d +li, p +lp, ls -d -lp +1);
- TALLOC_FREE(*list);
+ SAFE_FREE(*list);
*list = t;
ls += ld;
s = t +d +li;