Fix a memory leak in ContextImpl A typo in the Teardown code caused it to not destroy the cusolver handles, and thus leak memory. Change-Id: Id52661dd58dcd0356027e350ba78d381484dc2b6
diff --git a/internal/ceres/context_impl.cc b/internal/ceres/context_impl.cc index 0ad2abe..56c9785 100644 --- a/internal/ceres/context_impl.cc +++ b/internal/ceres/context_impl.cc
@@ -56,7 +56,7 @@ cublasDestroy(cublas_handle_); cublas_handle_ = nullptr; } - if (cusolver_handle_ != nullptr) { + if (cusparse_handle_ != nullptr) { cusparseDestroy(cusparse_handle_); cusparse_handle_ = nullptr; }