Skip to content

Commit

Permalink
[Fix] Fixed FlexPinnedBuffer destructor
Browse files Browse the repository at this point in the history
  • Loading branch information
LinGeLin authored and rhdong committed May 25, 2023
1 parent f1aa393 commit 7a22173
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/merlin/flexible_buffer.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class FlexPinnedBuffer {
}
~FlexPinnedBuffer() {
try {
if (!ptr_) CUDA_CHECK(cudaFreeHost(ptr_));
if (ptr_) CUDA_CHECK(cudaFreeHost(ptr_));
} catch (const nv::merlin::CudaException& e) {
cerr << "[HierarchicalKV] Failed to free FlexPinnedBuffer!" << endl;
}
Expand Down

0 comments on commit 7a22173

Please sign in to comment.