OGAWA Hirofumi 6fc87cc95b fat: fix memory allocation failure handling of match_strdup()
commit 35033ab988c396ad7bce3b6d24060c16a9066db8 upstream.

In parse_options(), if match_strdup() failed, parse_options() leaves
opts->iocharset in unexpected state (i.e.  still pointing the freed
string).  And this can be the cause of double free.

To fix, this initialize opts->iocharset always when freeing.

Link: http://lkml.kernel.org/r/8736wp9dzc.fsf@mail.parknet.co.jp
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Reported-by: syzbot+90b8e10515ae88228a92@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-25 11:23:58 +02:00
..
2016-10-15 12:09:13 -07:00
2017-08-06 18:59:43 -07:00
2018-05-30 07:50:47 +02:00
2017-11-30 08:39:04 +00:00
2018-07-03 11:23:17 +02:00
2018-06-06 16:44:38 +02:00
2017-06-14 15:06:00 +02:00
2016-09-27 21:20:53 -04:00
2016-09-27 18:47:38 -04:00
2018-05-16 10:08:42 +02:00
2016-06-21 09:23:11 +10:00
2018-02-17 13:21:15 +01:00
2017-06-14 15:06:01 +02:00