Skip to content

Commit 3685280

Browse files
umfranzwassistant-librarian[bot]
authored andcommitted
[rocm-libraries] ROCm/rocm-libraries#6251 (commit 697eff7)
[rocThrust] Fix memory leak in binary search test ## Motivation This commit fixes a memory leak in binary_search.hip. ## Technical Details The test was was missing a delete[] for a host-side allocation. ## Test Plan Build binary_search.hip with ASAN enabled. Run the test and verify that no leaks are reported. ## Test Result No leaks are reported with the fix in my local testing. ## Submission Checklist - [ ] Look over the contributing guidelines at https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.
1 parent a09b001 commit 3685280

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

test/test_binary_search.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ void RunSingleValueTest(const ExpectedFunction& ef, const ThrustDeviceFunction&
122122
}
123123

124124
delete[] host_search;
125+
delete[] host_input;
125126
delete[] host_expected;
126127
delete[] host_thrust_output;
127128
delete[] device_thrust_output;

0 commit comments

Comments
 (0)