aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikolaus Rath <Nikolaus@rath.org>2018-12-29 14:52:42 +0000
committerNikolaus Rath <Nikolaus@rath.org>2018-12-29 14:52:51 +0000
commit3bc72dafd26f113b1f98981e25f19312f78021e9 (patch)
treefe2d0d8c48078ebdf5e9ae9593e10d94ea7ef0fb
parent1c385157c7fc5920433572aeaf96dbdb966b6f9a (diff)
downloadlibfuse-3bc72dafd26f113b1f98981e25f19312f78021e9.tar.gz
Fixed memory leak.
Fixes: #338.
-rw-r--r--ChangeLog.rst6
-rw-r--r--example/passthrough_ll.c5
2 files changed, 6 insertions, 5 deletions
diff --git a/ChangeLog.rst b/ChangeLog.rst
index 32b9b4c..e016f5f 100644
--- a/ChangeLog.rst
+++ b/ChangeLog.rst
@@ -1,3 +1,9 @@
+Unreleased Changes
+==================
+
+* Fixed a memory leak in `examples/passthrough_ll.c`.
+
+
libfuse 3.4.1 (2018-12-22)
==========================
diff --git a/example/passthrough_ll.c b/example/passthrough_ll.c
index 5364b97..abb7ec9 100644
--- a/example/passthrough_ll.c
+++ b/example/passthrough_ll.c
@@ -384,14 +384,10 @@ static void lo_mknod_symlink(fuse_req_t req, fuse_ino_t parent,
int newfd = -1;
int res;
int saverr;
- struct lo_inode *inode;
struct lo_inode *dir = lo_inode(req, parent);
struct fuse_entry_param e;
saverr = ENOMEM;
- inode = calloc(1, sizeof(struct lo_inode));
- if (!inode)
- goto out;
if (S_ISDIR(mode))
res = mkdirat(dir->fd, name, mode);
@@ -417,7 +413,6 @@ static void lo_mknod_symlink(fuse_req_t req, fuse_ino_t parent,
out:
if (newfd != -1)
close(newfd);
- free(inode);
fuse_reply_err(req, saverr);
}