Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

[SYCL] fix memory leak #646

Merged
merged 2 commits into from
Dec 27, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions SYCL/InorderQueue/in_order_kernels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ int main() {
std::cerr << "Total mismatch = " << err_cnt << std::endl;
return 1;
}
free(A, ctx);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we free this memory in case of the test failures. see line 110?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving the free to line 107 (right after the loop) should do the trick.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Good catch.
Done.

}

std::cout << "Passed\n";
Expand Down