Skip to content

Commit

Permalink
Guard against deallocation of unallocated tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
fluidnumerics-joe committed Jun 15, 2024
1 parent b2a98a8 commit cf6977c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FEQParse_TokenStack.F90
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ subroutine Construct_TokenStack(stack,N)
subroutine Finalize_TokenStack(stack)
class(TokenStack),intent(inout) :: stack

deallocate(stack%tokens)
if(allocated(stack%tokens)) deallocate(stack%tokens)

endsubroutine Finalize_TokenStack

Expand Down

0 comments on commit cf6977c

Please sign in to comment.