Skip to content

Commit

Permalink
Pint: Fix memory leak for centroid constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
cschran authored and hforbert committed Aug 22, 2019
1 parent 7f3c9bc commit b70f537
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/motion/pint_methods.F
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ MODULE pint_methods
rep_env_create
USE replica_types, ONLY: rep_env_release,&
replica_env_type
USE simpar_types, ONLY: create_simpar_type
USE simpar_types, ONLY: create_simpar_type,&
release_simpar_type
#include "../base/base_uses.f90"

IMPLICIT NONE
Expand Down Expand Up @@ -754,6 +755,11 @@ SUBROUTINE pint_release(pint_env)
DEALLOCATE (pint_env%rtmp_natom)
DEALLOCATE (pint_env%propagator)

IF (pint_env%simpar%constraint) THEN
DEALLOCATE(pint_env%atoms_constraints)
END IF
CALL release_simpar_type(pint_env%simpar)

IF (pint_env%harm_integrator == integrate_exact) THEN
DEALLOCATE (pint_env%wsinex)
DEALLOCATE (pint_env%iwsinex)
Expand Down

0 comments on commit b70f537

Please sign in to comment.