]> git.baikalelectronics.ru Git - kernel.git/commit
jbd2: don't leak memory if setting up journal fails
authorEric Biggers <ebiggers@google.com>
Wed, 15 Mar 2017 19:08:48 +0000 (15:08 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 15 Mar 2017 19:08:48 +0000 (15:08 -0400)
commit9ea0fccfa0d4096723c4af016a6edae2c6476fa9
tree6390b945bfba94fc1f7cbc37a0151755ab94214e
parent8fc680748f1ef2da501b201e3286a93e7d8794a0
jbd2: don't leak memory if setting up journal fails

In journal_init_common(), if we failed to allocate the j_wbuf array, or
if we failed to create the buffer_head for the journal superblock, we
leaked the memory allocated for the revocation tables.  Fix this.

Cc: stable@vger.kernel.org # 4.9
Fixes: 20191ae6e44bca6b24409fe575b1ec566a960a80
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jan Kara <jack@suse.cz>
fs/jbd2/journal.c
fs/jbd2/revoke.c