aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/virtiofsd/buffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/virtiofsd/buffer.c b/tools/virtiofsd/buffer.c
index 874f01c488..b5f04be356 100644
--- a/tools/virtiofsd/buffer.c
+++ b/tools/virtiofsd/buffer.c
@@ -37,7 +37,7 @@ static ssize_t fuse_buf_writev(struct fuse_buf *out_buf,
struct iovec *iov;
int fd = out_buf->fd;
- iov = calloc(iovcnt, sizeof(struct iovec));
+ iov = g_try_new0(struct iovec, iovcnt);
if (!iov) {
return -ENOMEM;
}
@@ -61,7 +61,7 @@ static ssize_t fuse_buf_writev(struct fuse_buf *out_buf,
res = -errno;
}
- free(iov);
+ g_free(iov);
return res;
}