Skip to content

Commit b8d0883

Browse files
authored
Merge pull request #462 from ldorau/Fix_one_memcheck_error_in_the_umfLevelZeroProviderTest.basic_test
Fix one memcheck error in the umfLevelZeroProviderTest.basic test
2 parents d927fce + 245f494 commit b8d0883

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/providers/provider_level_zero.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ TEST_F(umfLevelZeroProviderTest, basic) {
364364
ASSERT_EQ(alloc_props.type, ZE_MEMORY_TYPE_DEVICE);
365365

366366
// check if the pattern was successfully applied
367-
uint32_t *hostMemory = (uint32_t *)malloc(size);
367+
uint32_t *hostMemory = (uint32_t *)calloc(1, size);
368368
CopyDeviceToHostMemory(hostMemory, ptr, size);
369369
for (size_t i = 0; i < size / sizeof(int); i++) {
370370
ASSERT_EQ(hostMemory[i], pattern);

0 commit comments

Comments
 (0)