summaryrefslogtreecommitdiff
path: root/source4/ntvfs
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-05-27 17:11:00 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-05-28 10:04:46 +0200
commit69166d3ebb1ad1590d1d6078a2c6b592d06aef5e (patch)
treecf62a2a827483eadb82d874580135e3e3a4d3feb /source4/ntvfs
parent315ae8ae9787935f012169b2c001a827078c92e0 (diff)
downloadsamba-69166d3ebb1ad1590d1d6078a2c6b592d06aef5e.tar.gz
samba-69166d3ebb1ad1590d1d6078a2c6b592d06aef5e.tar.bz2
samba-69166d3ebb1ad1590d1d6078a2c6b592d06aef5e.zip
s4:ntvfs/nbench/vfs_bench.c - change a "asprintf" into a "talloc_asprintf"
Diffstat (limited to 'source4/ntvfs')
-rw-r--r--source4/ntvfs/nbench/vfs_nbench.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/ntvfs/nbench/vfs_nbench.c b/source4/ntvfs/nbench/vfs_nbench.c
index 2500140762..72873a19c2 100644
--- a/source4/ntvfs/nbench/vfs_nbench.c
+++ b/source4/ntvfs/nbench/vfs_nbench.c
@@ -123,9 +123,11 @@ static NTSTATUS nbench_connect(struct ntvfs_module_context *ntvfs,
return NT_STATUS_NO_MEMORY;
}
- asprintf(&logname, "/tmp/nbenchlog%d.%u", ntvfs->depth, getpid());
+ logname = talloc_asprintf(req, "/tmp/nbenchlog%d.%u", ntvfs->depth,
+ getpid());
+ NT_STATUS_HAVE_NO_MEMORY(logname);
nprivates->log_fd = open(logname, O_WRONLY|O_CREAT|O_APPEND, 0644);
- free(logname);
+ talloc_free(logname);
if (nprivates->log_fd == -1) {
DEBUG(0,("Failed to open nbench log\n"));