From 4f867bad14672aab02ef3143e14bc63d0e36f569 Mon Sep 17 00:00:00 2001 From: Michele Guerini Rocco Date: Wed, 15 Dec 2021 02:31:08 +0100 Subject: [PATCH] src/magsurf_data.f90: fix memory leak --- src/magsurf_data.f90 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/magsurf_data.f90 b/src/magsurf_data.f90 index 510e9c9..b6e038a 100644 --- a/src/magsurf_data.f90 +++ b/src/magsurf_data.f90 @@ -97,6 +97,7 @@ contains if(allocated(cratjpl)) deallocate(cratjpl) if(allocated(cratja)) deallocate(cratja) if(allocated(cratjb)) deallocate(cratjb) + if(allocated(tjp)) deallocate(tjp,tlm,ch) end subroutine dealloc_surfvec @@ -419,7 +420,8 @@ contains do jp=ninpr+1,npsi,ninpr call print_contour(psicon(jp),rcon(:,jp),zcon(:,jp)) end do - + + deallocate(rctemp, zctemp) end subroutine flux_average