Skip to content

Commit

Permalink
fix interp_free issue if there is only one handle
Browse files Browse the repository at this point in the history
  • Loading branch information
stgeke committed Feb 14, 2021
1 parent 002ed02 commit 19906d4
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions core/interp.f
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,12 @@ subroutine interp_free(ih)

common /intp_h/ ih_intp(2,INTP_HMAX)

ih_intp1 = ih_intp(1,ih)
ih_intp2 = ih_intp(2,ih)

call fgslib_findpts_free(ih_intp1)
call fgslib_findpts_free(ih_intp2)
if(ih_intp(2,ih) .ne. ih_intp(1,ih)) then
call fgslib_findpts_free(ih_intp(2,ih))
ih_intp(2,ih) = -1
endif
call fgslib_findpts_free(ih_intp(1,ih))
ih_intp(1,ih) = -1

return
end
Expand Down

0 comments on commit 19906d4

Please sign in to comment.