diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-11-21 09:47:44 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-11-21 09:47:44 -0800 |
commit | 597861d6cd343a6ded4cf0302f6fc25ec548e1cc (patch) | |
tree | 22e9adbcab3faa519280cc729c6291d911be54f2 | |
parent | 2edc8f933df7dfc7f9f7e0af8aa68c3b9e8cbade (diff) | |
parent | 344044d8c9e256f86d51fd30212dd63ecb9f3333 (diff) |
Merge tag 'for_v6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull quota and isofs updates from Jan Kara:
"Fix a memory leak in isofs and a cleanup of includes in quota"
* tag 'for_v6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
dquot.c: get rid of include ../internal.h
isofs: avoid memory leak in iocharset
-rw-r--r-- | fs/isofs/inode.c | 8 | ||||
-rw-r--r-- | fs/quota/dquot.c | 1 |
2 files changed, 4 insertions, 5 deletions
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c index f50311a6b429..47038e660812 100644 --- a/fs/isofs/inode.c +++ b/fs/isofs/inode.c @@ -948,8 +948,6 @@ root_found: goto out_no_inode; } - kfree(opt->iocharset); - return 0; /* @@ -987,7 +985,6 @@ out_freebh: brelse(bh); brelse(pri_bh); out_freesbi: - kfree(opt->iocharset); kfree(sbi); s->s_fs_info = NULL; return error; @@ -1528,7 +1525,10 @@ static int isofs_get_tree(struct fs_context *fc) static void isofs_free_fc(struct fs_context *fc) { - kfree(fc->fs_private); + struct isofs_options *opt = fc->fs_private; + + kfree(opt->iocharset); + kfree(opt); } static const struct fs_context_operations isofs_context_ops = { diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index b40410cd39af..3dd8d6f27725 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c @@ -80,7 +80,6 @@ #include <linux/quotaops.h> #include <linux/blkdev.h> #include <linux/sched/mm.h> -#include "../internal.h" /* ugh */ #include <linux/uaccess.h> |