summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix/pvfs_resolve.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/ntvfs/posix/pvfs_resolve.c')
-rw-r--r--source4/ntvfs/posix/pvfs_resolve.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/ntvfs/posix/pvfs_resolve.c b/source4/ntvfs/posix/pvfs_resolve.c
index 43547c275b..c33323350e 100644
--- a/source4/ntvfs/posix/pvfs_resolve.c
+++ b/source4/ntvfs/posix/pvfs_resolve.c
@@ -464,7 +464,7 @@ static NTSTATUS pvfs_reduce_name(TALLOC_CTX *mem_ctx,
}
/* rebuild the name */
- ret = talloc_size(mem_ctx, len+1);
+ ret = talloc_array(mem_ctx, char, len+1);
if (ret == NULL) {
talloc_free(s);
return NT_STATUS_NO_MEMORY;
@@ -478,6 +478,8 @@ static NTSTATUS pvfs_reduce_name(TALLOC_CTX *mem_ctx,
}
ret[len] = 0;
+ talloc_set_name_const(ret, ret);
+
talloc_free(s);
*fname = ret;