conjugateGradient: Ensure allocated memory is freed (#336)

Fixes #202
This commit is contained in:
Jonathan Bentz
2025-02-21 11:20:53 -06:00
committed by GitHub
parent 3bc08136ff
commit 29fb758e62

View File

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