reiserfs: Fix memory leak of journal device string
authorJan Kara <jack@suse.cz>
Thu, 12 Dec 2019 10:30:03 +0000 (11:30 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 22 May 2020 20:19:17 +0000 (21:19 +0100)
commit363f8afc312609a42015c8b8161a458e1749cd4c
treed0ffb2aa1b4ab2bb2fc47529c307c8792c5c390b
parentd525915ba099d34e08606ef44bf8cdc899c18f95
reiserfs: Fix memory leak of journal device string

commit 5474ca7da6f34fa95e82edc747d5faa19cbdfb5c upstream.

When a filesystem is mounted with jdev mount option, we store the
journal device name in an allocated string in superblock. However we
fail to ever free that string. Fix it.

Reported-by: syzbot+1c6756baf4b16b94d2a6@syzkaller.appspotmail.com
Fixes: c3aa077648e1 ("reiserfs: Properly display mount options in /proc/mounts")
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
fs/reiserfs/super.c