diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index b136b46b63bc..c8d59f7c4745 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -409,6 +409,7 @@ repeat: tmp = jbd2_alloc(bh_in->b_size, GFP_NOFS); if (!tmp) { brelse(new_bh); + free_buffer_head(new_bh); return -ENOMEM; } spin_lock(&jh_in->b_state_lock);