Changeset 204 for branches/samba-3.2.x/source/lib/util_str.c
- Timestamp:
- May 20, 2009, 6:46:53 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.2.x/source/lib/util_str.c
r141 r204 2007 2007 bool str_list_substitute(char **list, const char *pattern, const char *insert) 2008 2008 { 2009 TALLOC_CTX *ctx = list; 2009 2010 char *p, *s, *t; 2010 2011 ssize_t ls, lp, li, ld, i, d; … … 2029 2030 d = p -t; 2030 2031 if (ld) { 2031 t = (char *) SMB_MALLOC(ls +ld +1);2032 t = TALLOC_ARRAY(ctx, char, ls +ld +1); 2032 2033 if (!t) { 2033 2034 DEBUG(0,("str_list_substitute: " … … 2037 2038 memcpy(t, *list, d); 2038 2039 memcpy(t +d +li, p +lp, ls -d -lp +1); 2039 SAFE_FREE(*list);2040 TALLOC_FREE(*list); 2040 2041 *list = t; 2041 2042 ls += ld;
Note:
See TracChangeset
for help on using the changeset viewer.