All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mkfs.f2fs: fix check error when calloc sum_compact failure
@ 2015-12-21  7:44 Liu Xue
  0 siblings, 0 replies; only message in thread
From: Liu Xue @ 2015-12-21  7:44 UTC (permalink / raw)
  To: jaegeuk; +Cc: linux-f2fs-devel

We should check sum_compact value when deal with sum_compact
calloc failure.

Signed-off-by: Xue Liu <liuxueliu.liu@huawei.com>
---
 mkfs/f2fs_format.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c
index b0c12f2..7caf733 100644
--- a/mkfs/f2fs_format.c
+++ b/mkfs/f2fs_format.c
@@ -460,7 +460,7 @@ static int f2fs_write_check_point_pack(void)
 	}
 
 	sum_compact = calloc(F2FS_BLKSIZE, 1);
-	if (sum == NULL) {
+	if (sum_compact == NULL) {
 		MSG(1, "\tError: Calloc Failed for summay buffer!!!\n");
 		goto free_sum;
 	}
-- 
1.8.3.4


------------------------------------------------------------------------------

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-12-21  7:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-21  7:44 [PATCH] mkfs.f2fs: fix check error when calloc sum_compact failure Liu Xue

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.