diff --git a/src/symba/symba_util.f90 b/src/symba/symba_util.f90 index 2ab088d02..028b0678c 100644 --- a/src/symba/symba_util.f90 +++ b/src/symba/symba_util.f90 @@ -388,6 +388,10 @@ module subroutine symba_util_rearray_pl(self, system, param) call tmp%setup(0,param) deallocate(tmp) + ! Deallocate any temporary variables + if (allocated(pl%xbeg)) deallocate(pl%xbeg) + if (allocated(pl%xend)) deallocate(pl%xend) + ! Add in any new bodies call pl%append(pl_adds)