[SCM] Samba Shared Repository - branch v3-2-test updated -
release-3-2-0pre2-2946-g02e260a
Jeremy Allison
jra at samba.org
Thu Aug 21 17:26:21 GMT 2008
The branch, v3-2-test has been updated
via 02e260ab5254c9691846f7009f685e1b11032f80 (commit)
from 24459c7eda080a4fed2d4f2a576c97f878f905f9 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit 02e260ab5254c9691846f7009f685e1b11032f80
Author: Jeremy Allison <jra at samba.org>
Date: Thu Aug 21 10:25:51 2008 -0700
Fix bug 5698 - mixup of TALLOC/malloc. Spotted by Douglas Wegscheid <Douglas_E_Wegscheid at whirlpool.com>.
Jeremy.
-----------------------------------------------------------------------
Summary of changes:
source/lib/util_str.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/lib/util_str.c b/source/lib/util_str.c
index c36d512..a2458c8 100644
--- a/source/lib/util_str.c
+++ b/source/lib/util_str.c
@@ -2006,6 +2006,7 @@ 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;
@@ -2028,7 +2029,7 @@ bool str_list_substitute(char **list, const char *pattern, const char *insert)
t = *list;
d = p -t;
if (ld) {
- t = (char *) SMB_MALLOC(ls +ld +1);
+ t = TALLOC_ARRAY(ctx, char, ls +ld +1);
if (!t) {
DEBUG(0,("str_list_substitute: "
"Unable to allocate memory"));
@@ -2036,7 +2037,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);
- SAFE_FREE(*list);
+ TALLOC_FREE(*list);
*list = t;
ls += ld;
s = t +d +li;
--
Samba Shared Repository
More information about the samba-cvs
mailing list