aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2024-04-25 13:22:15 -0400
committerTheodore Ts'o <tytso@mit.edu>2024-04-25 13:22:15 -0400
commit7b76a84fd8f75fb53849a751db27d7dfd17bd8b6 (patch)
treebf8945386d5301c83a2e80ec0e1ed3cbb8394204
parentd3f7ef6b3b8bd90f5c6004292470f2b4a2cd6f2e (diff)
downloade2fsprogs-7b76a84fd8f75fb53849a751db27d7dfd17bd8b6.tar.gz
fsck: fix memory leak on an error exit
This reduces noise from a static analyzer. https://github.com/tytso/e2fsprogs/issues/160 Signed-off-by: Theodore Ts'o <tytso@mit.
-rw-r--r--misc/fsck.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/misc/fsck.c b/misc/fsck.c
index 1769a1064..64d0e7c06 100644
--- a/misc/fsck.c
+++ b/misc/fsck.c
@@ -806,6 +806,7 @@ static void compile_fs_type(char *fs_type, struct fs_type_compile *cmp)
if ((negate && !cmp->negate) ||
(!negate && cmp->negate)) {
fputs(_(fs_type_syntax_error), stderr);
+ free(list);
exit(EXIT_USAGE);
}
}