Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 43626c0a authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "f2fs: Fix double free issue for s_encoding"

parents b20ec664 9bc7ed61
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -1265,7 +1265,10 @@ static void f2fs_put_super(struct super_block *sb)
	for (i = 0; i < NR_PAGE_TYPE; i++)
		kvfree(sbi->write_io[i]);
#ifdef CONFIG_UNICODE
	if (sb->s_encoding) {
		utf8_unload(sb->s_encoding);
		sb->s_encoding = NULL;
	}
#endif
	kvfree(sbi);
}
@@ -3842,7 +3845,10 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
		kvfree(sbi->write_io[i]);

#ifdef CONFIG_UNICODE
	if (sb->s_encoding) {
		utf8_unload(sb->s_encoding);
		sb->s_encoding = NULL;
	}
#endif
free_options:
#ifdef CONFIG_QUOTA