aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorMatthias Görgens <matthias.goergens@gmail.com>2023-06-08 18:20:56 +0800
committerGitHub <noreply@github.com>2023-06-08 11:20:56 +0100
commiteb9eb1d8f1165293e56f996698e09d58e644908a (patch)
treea2d25755a038b162f2d435a9d956633c1e2f7337 /util
parent30a300a848ee5158afa89d1344392a5949923602 (diff)
downloadlibfuse-eb9eb1d8f1165293e56f996698e09d58e644908a.tar.gz
Fix memory leak (#785)
This is just to [keep address sanitizer happy](https://github.com/libfuse/libfuse/actions/runs/4730520764/jobs/8394347666?pr=784). The OS would normally clean this up anyway. Co-authored-by: Nikolaus Rath <Nikolaus@rath.org>
Diffstat (limited to 'util')
-rw-r--r--util/fusermount.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/util/fusermount.c b/util/fusermount.c
index 034383e..06f2461 100644
--- a/util/fusermount.c
+++ b/util/fusermount.c
@@ -1468,6 +1468,7 @@ int main(int argc, char *argv[])
if (!auto_unmount) {
free(mnt);
+ free((void*) type);
return 0;
}
@@ -1520,10 +1521,12 @@ do_unmount:
goto err_out;
success_out:
+ free((void*) type);
free(mnt);
return 0;
err_out:
+ free((void*) type);
free(mnt);
exit(1);
}