Whamcloud - gitweb
misc: clean up error handling for ext2fs_run_ext3_journal()
authorTheodore Ts'o <tytso@mit.edu>
Sun, 15 Oct 2017 04:22:20 +0000 (00:22 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 15 Oct 2017 04:22:20 +0000 (00:22 -0400)
commit6ae16a6814f47c96c261519380df7a7820c8f468
tree221dd7e62073bd7a9eaacb5bbbd52fbd21a13609
parent257f009d1034737096f197dc875931207bcdfc75
misc: clean up error handling for ext2fs_run_ext3_journal()

The ext2fs_run_ext3_journal() function is in debugfs/journal.c, and in
some error conditions cases may close the passed-in file system handle.

Clean up the both the function so that it reliably clears the file
system handle if it has been freed, and its callers so that they do
not crash by dereferencing a null pointer if it has been freed.

Reported-by: Erkki Ruohtula <eru@netti.fi>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
debugfs/journal.c
misc/fuse2fs.c
misc/tune2fs.c