From 724915f721819705c7cf5c850a24b32f815c07e3 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 29 Apr 2011 12:05:07 +1000 Subject: s3-client Add TALLOC_CTX argument to attrib_string(). This ensures the caller knows where the memory was allocated. Andrew Bartlett --- source3/lib/util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/lib') 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); } /******************************************************************* -- cgit