summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-04-29 12:05:07 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-04-29 16:38:14 +1000
commit724915f721819705c7cf5c850a24b32f815c07e3 (patch)
treedd4b2748fea9466d941a261ee5a50d1b01874c84 /source3/lib
parent0520da2bbe246c45d89bfdec0d399862ecb867ba (diff)
downloadsamba-724915f721819705c7cf5c850a24b32f815c07e3.tar.gz
samba-724915f721819705c7cf5c850a24b32f815c07e3.tar.bz2
samba-724915f721819705c7cf5c850a24b32f815c07e3.zip
s3-client Add TALLOC_CTX argument to attrib_string().
This ensures the caller knows where the memory was allocated. Andrew Bartlett
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index f592a0f778..d908ea86f0 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -298,7 +298,7 @@ SMB_OFF_T get_file_size(char *file_name)
Return a string representing an attribute for a file.
********************************************************************/
-char *attrib_string(uint16 mode)
+char *attrib_string(TALLOC_CTX *mem_ctx, uint16 mode)
{
fstring attrstr;
@@ -311,7 +311,7 @@ char *attrib_string(uint16 mode)
if (mode & FILE_ATTRIBUTE_SYSTEM) fstrcat(attrstr,"S");
if (mode & FILE_ATTRIBUTE_READONLY) fstrcat(attrstr,"R");
- return talloc_strdup(talloc_tos(), attrstr);
+ return talloc_strdup(mem_ctx, attrstr);
}
/*******************************************************************