Skip to content

Commit f1736a7

Browse files
committed
Fix invalid condition in ScopedDescriptor's destructor which led to memory leak.
1 parent 3cf396c commit f1736a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

third_party/xla/xla/stream_executor/rocm/rocm_dnn.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ struct ScopedDescriptor {
858858
}
859859

860860
~ScopedDescriptor() {
861-
if (handle_ != nullptr) return;
861+
if (handle_ == nullptr) return;
862862

863863
auto status = miDestroyObject(
864864
handle_); // wrap::miopenDestroyTensorDescriptor(handle_);

0 commit comments

Comments
 (0)