summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/ntvfs/simple/svfs_util.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/ntvfs/simple/svfs_util.c b/source4/ntvfs/simple/svfs_util.c
index 70ba340727..2a01c2d5de 100644
--- a/source4/ntvfs/simple/svfs_util.c
+++ b/source4/ntvfs/simple/svfs_util.c
@@ -120,14 +120,15 @@ struct svfs_dir *svfs_list_unix(TALLOC_CTX *mem_ctx, struct ntvfs_request *req,
dir->files[i].name = low_name;
if (!dir->files[i].name) { continue; }
- asprintf(&full_name, "%s/%s", dir->unix_dir, dir->files[i].name);
+ full_name = talloc_asprintf(mem_ctx, "%s/%s", dir->unix_dir,
+ dir->files[i].name);
if (!full_name) { continue; }
if (stat(full_name, &dir->files[i].st) == 0) {
dir->count++;
}
- free(full_name);
+ talloc_free(full_name);
}
closedir(odir);