Skip to content
This repository has been archived by the owner on Oct 23, 2020. It is now read-only.

Fix framework config pool memory leak #1501

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/framework/mpas_pool_routines.F
Original file line number Diff line number Diff line change
Expand Up @@ -5827,6 +5827,10 @@ logical function pool_remove_member(inPool, key, memType)!{{{
end if

!TODO: are there cases where we need to delete more data here?
!A: Yes at least one.
if (associated(ptr_prev % data)) then
deallocate(ptr_prev % data)
end if
deallocate(ptr_prev)
end if
pool_remove_member = .true.
Expand Down Expand Up @@ -5860,6 +5864,10 @@ logical function pool_remove_member(inPool, key, memType)!{{{
end if

!TODO: are there cases where we need to delete more data here?
!A: Yes at least one.
if (associated(ptr % data)) then
deallocate(ptr % data)
end if
deallocate(ptr)
end if
pool_remove_member = .true.
Expand Down