diff --git a/test-tool/test_writesame16_unmap.c b/test-tool/test_writesame16_unmap.c index 3e3dfd9..206484f 100644 --- a/test-tool/test_writesame16_unmap.c +++ b/test-tool/test_writesame16_unmap.c @@ -30,7 +30,7 @@ test_writesame16_unmap(void) { int i, ret; unsigned int j; - unsigned char *buf = malloc(65536 * block_size); + unsigned char *buf; CHECK_FOR_DATALOSS; CHECK_FOR_THIN_PROVISIONING; @@ -39,6 +39,7 @@ test_writesame16_unmap(void) logging(LOG_VERBOSE, LOG_BLANK_LINE); logging(LOG_VERBOSE, "Test WRITESAME16 of 1-256 blocks at the start of the LUN"); + buf = malloc(65536 * block_size); for (i = 1; i <= 256; i++) { logging(LOG_VERBOSE, "Write %d blocks of 0xFF", i); memset(buf, 0xff, i * block_size);