conjugateGradient: Ensure allocated memory is freed ()

Fixes 
This commit is contained in:
Jonathan Bentz 2025-02-21 11:20:53 -06:00 committed by GitHub
parent 3bc08136ff
commit 29fb758e62
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -231,6 +231,10 @@ int main(int argc, char **argv) {
} }
} }
if (buffer) {
checkCudaErrors(cudaFree(buffer));
}
cusparseDestroy(cusparseHandle); cusparseDestroy(cusparseHandle);
cublasDestroy(cublasHandle); cublasDestroy(cublasHandle);
if (matA) { if (matA) {