aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2008-03-25 21:20:40 +0000
committerMiklos Szeredi <miklos@szeredi.hu>2008-03-25 21:20:40 +0000
commitf2625f11065b6a1e58e4ba43e5534ecfdb410a86 (patch)
treeb88455b36d924dba9df5944c78d1c1d8f2a87571
parent25b5fdbccab1a05f8d772efb0e43a98ac6abea30 (diff)
downloadlibfuse-f2625f11065b6a1e58e4ba43e5534ecfdb410a86.tar.gz
Fix memory leaks on mount
-rw-r--r--ChangeLog4
-rw-r--r--lib/mount.c2
-rw-r--r--util/fusermount.c1
3 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 3de8479..7e1de07 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-03-25 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix memory leaks on mount. Patch by Szabolcs Szakacsits
+
2008-03-19 Miklos Szeredi <miklos@szeredi.hu>
* Fix missing pthread_mutex_destroy in error path of
diff --git a/lib/mount.c b/lib/mount.c
index ed5f56d..159dc48 100644
--- a/lib/mount.c
+++ b/lib/mount.c
@@ -496,6 +496,8 @@ static int fuse_mount_sys(const char *mnt, struct mount_opts *mo,
if (res == -1)
goto out_umount;
}
+ free(type);
+ free(source);
return fd;
diff --git a/util/fusermount.c b/util/fusermount.c
index e3c98c5..12e0c9f 100644
--- a/util/fusermount.c
+++ b/util/fusermount.c
@@ -526,6 +526,7 @@ static int do_mount(const char *mnt, char **typep, mode_t rootmode,
*typep = type;
*mnt_optsp = mnt_opts;
}
+ free(fsname);
free(optbuf);
return res;