From 377214d74f9e5c9390428429dea196a98d4a11bf Mon Sep 17 00:00:00 2001 From: Raimondas Galvelis Date: Tue, 6 Oct 2020 11:20:16 +0200 Subject: [PATCH] Fix memory leak in CudaANISymmetryFunctions --- ani/CudaANISymmetryFunctions.cu | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ani/CudaANISymmetryFunctions.cu b/ani/CudaANISymmetryFunctions.cu index a1031e1..f3d2e0b 100644 --- a/ani/CudaANISymmetryFunctions.cu +++ b/ani/CudaANISymmetryFunctions.cu @@ -76,6 +76,8 @@ CudaANISymmetryFunctions::~CudaANISymmetryFunctions() { cudaFree(positions); if (neighbors != 0) cudaFree(neighbors); + if (neighborCount != 0) + cudaFree(neighborCount); if (periodicBoxVectors != 0) cudaFree(periodicBoxVectors); if (angularIndex != 0)