浏览代码

jbd2: Fix memory leak when verifying checksums in the journal

Cc: Andreas Dilger <adilger@clusterfs.com>
Cc: Girish Shilamkar <girish@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Theodore Ts'o 17 年之前
父节点
当前提交
8ea76900be
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      fs/jbd2/recovery.c

+ 1 - 0
fs/jbd2/recovery.c

@@ -344,6 +344,7 @@ static int calc_chksums(journal_t *journal, struct buffer_head *bh,
 			*crc32_sum = crc32_be(*crc32_sum, (void *)obh->b_data,
 			*crc32_sum = crc32_be(*crc32_sum, (void *)obh->b_data,
 				     obh->b_size);
 				     obh->b_size);
 		}
 		}
+		put_bh(obh);
 	}
 	}
 	return 0;
 	return 0;
 }
 }