From acba0fb51bb1a27f5aa7cbf26b77a68c5dc203f0 Mon Sep 17 00:00:00 2001 From: George Gayno Date: Wed, 4 Aug 2021 21:10:04 +0000 Subject: [PATCH] Fix memory leak in filter_topo.F90 that was found by running the GNU debug option. Fixes #105 --- sorc/grid_tools.fd/filter_topo.fd/filter_topo.F90 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sorc/grid_tools.fd/filter_topo.fd/filter_topo.F90 b/sorc/grid_tools.fd/filter_topo.fd/filter_topo.F90 index aaf779f15d..0297252b29 100644 --- a/sorc/grid_tools.fd/filter_topo.fd/filter_topo.F90 +++ b/sorc/grid_tools.fd/filter_topo.fd/filter_topo.F90 @@ -81,9 +81,13 @@ program filter_topo call FV3_zs_filter(is,ie,js,je,isd,ied,jsd,jed,npx,npy,npx,ntiles,grid_type, & stretch_fac, nested, area, dxa, dya, dx, dy, dxc, dyc, sin_sg, oro, regional ) + deallocate(sin_sg, dx, dy, mask, dxc, dyc, area, dxa, dya) + !--- write out the data call write_topo_file(is,ie,js,je,ntiles,oro(is:ie,js:je,:),regional ) + deallocate (oro) + contains !> ???