summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix/pvfs_rename.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/ntvfs/posix/pvfs_rename.c')
-rw-r--r--source4/ntvfs/posix/pvfs_rename.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/ntvfs/posix/pvfs_rename.c b/source4/ntvfs/posix/pvfs_rename.c
index ed90bf3d7b..8001428122 100644
--- a/source4/ntvfs/posix/pvfs_rename.c
+++ b/source4/ntvfs/posix/pvfs_rename.c
@@ -103,7 +103,7 @@ static const char *pvfs_resolve_wildcard_component(TALLOC_CTX *mem_ctx,
char *dest, *d;
/* the length is bounded by the length of the two strings combined */
- dest = talloc_size(mem_ctx, strlen(fname) + strlen(pattern) + 1);
+ dest = talloc_array(mem_ctx, char, strlen(fname) + strlen(pattern) + 1);
if (dest == NULL) {
return NULL;
}
@@ -133,6 +133,8 @@ static const char *pvfs_resolve_wildcard_component(TALLOC_CTX *mem_ctx,
*d = 0;
+ talloc_set_name_const(dest, dest);
+
return dest;
}