]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
tune2fs: exit directly when fs freed in ext2fs_run_ext3_journal
authorLi Jinlin <lijinlin3@huawei.com>
Fri, 16 Sep 2022 07:42:23 +0000 (15:42 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 20 Oct 2022 15:02:18 +0000 (11:02 -0400)
commit47ab1faccb228e10869898c8a02b06f5a91a9174
treea11174020e8f08bebe3a33b4257e5e1342912cdf
parent4e5f24ae426732cf6e3b1d68fa43c058a8d35156
tune2fs: exit directly when fs freed in ext2fs_run_ext3_journal

In ext2fs_run_ext3_journal(), fs will be freed and reallocated.
However, the reallocation by ext2fs_open() may fail in some cases ---
for example, when the device becomes offline.  To avoid a segfault,
exit if fs is NULL.

[ Simplified the patch by by simply exiting if fs is NULL -TYT ]

Signed-off-by: Li Jinlin <lijinlin3@huawei.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/tune2fs.c