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

[SYCL] fix memory leak #646

merged 2 commits into from
Dec 27, 2021

Conversation

bso-intel
Copy link

Added missing free call to fix memory leak.

Signed-off-by: Byoungro So [email protected]

Signed-off-by: Byoungro So <[email protected]>
@bso-intel bso-intel requested a review from a team as a code owner December 21, 2021 05:16
@@ -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.

Signed-off-by: Byoungro So <[email protected]>
@vladimirlaz vladimirlaz merged commit 93abde1 into intel:intel Dec 27, 2021
myler pushed a commit to myler/llvm-test-suite that referenced this pull request Apr 12, 2022
aelovikov-intel pushed a commit to aelovikov-intel/llvm that referenced this pull request Mar 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants