Skip to content

Commit 9150e78

Browse files
yingcong-wuKornevNikita
authored andcommitted
[SYCL][E2E] Fix memory leaks in tests (#16375)
1 parent f324c55 commit 9150e78

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

sycl/test-e2e/AOT/early_aot.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ int main() {
5252
return 1;
5353
}
5454
std::cout << "PASSED\n";
55+
free(result, q);
5556
return 0;
5657
}
5758

sycl/test-e2e/Adapters/level_zero_interop_memcpy.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,7 @@ int main() {
2828
int *hostMem = (int *)malloc_host(sizeof(int), Q2);
2929
int *devMem = malloc_device<int>(1, Q2);
3030
Q2.memcpy(hostMem, devMem, sizeof(int));
31+
32+
free(hostMem, Q2);
33+
free(devMem, Q2);
3134
}

sycl/test-e2e/Matrix/joint_matrix_apply_two_matrices_impl.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ bool apply_verify(Tc *C, Tc *D, Tc *ref) {
2020

2121
matrix_apply(M, N, refcopy, add5<Tc>);
2222
res &= matrix_compare(M, N, C, refcopy);
23+
std::free(refcopy);
2324
return res;
2425
}
2526

0 commit comments

Comments
 (0)