From: Andrew Morton Date: Wed, 20 Feb 2013 02:13:48 +0000 (+1100) Subject: ocfs2-remove-kfree-redundant-null-checks-fix X-Git-Tag: next-20130220~1^2~626 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c6d23ac2bb439d144d10e040cea8f72cfafeb6b2;p=karo-tx-linux.git ocfs2-remove-kfree-redundant-null-checks-fix revert dubious change in ocfs2_begin_truncate_log_recovery() Cc: Joel Becker Cc: Mark Fasheh Cc: Tim Gardner Signed-off-by: Andrew Morton --- diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index 83a1a1d9d1bf..b8a9d87231b1 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c @@ -6134,7 +6134,7 @@ bail: iput(tl_inode); brelse(tl_bh); - if (status < 0) { + if (status < 0 && (*tl_copy)) { kfree(*tl_copy); *tl_copy = NULL; mlog_errno(status);