Skip to content

Commit 340858b

Browse files
authored
[SYCL] Fix memory leak in Prefetch tests (#12420)
1 parent e49ffbd commit 340858b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

sycl/test-e2e/Prefetch/joint_prefetch.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ int main() {
134134
address_space_cast<
135135
access::address_space::global_space COMMA access::decorated::yes>(
136136
&dataChar[idx.get_local_linear_id() * arrSize]))
137+
138+
free(dataChar, q);
137139
}
138140
{
139141
std::vector<int> data(N);

sycl/test-e2e/Prefetch/prefetch.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ int main() {
119119
address_space_cast<
120120
access::address_space::global_space COMMA access::decorated::yes>(
121121
&dataChar[idx * arrSize]))
122+
123+
free(dataChar, q);
122124
}
123125
{
124126
std::vector<int> data(N);

0 commit comments

Comments
 (0)