Skip to content

Commit

Permalink
Fix leaks in qs_kinetic and qs_overlap (#1642)
Browse files Browse the repository at this point in the history
  • Loading branch information
fstein93 committed Sep 13, 2021
1 parent ca5cdc8 commit 698770d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/qs_kinetic.F
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ SUBROUTINE build_kinetic_matrix_low(ks_env, matrix_t, matrixkp_t, matrix_name, b
sab_nl, do_symmetric)
END IF

use_virial = .FALSE.
IF (do_forces) THEN
! if forces -> maybe virial too
CALL get_ks_env(ks_env=ks_env, force=force, virial=virial)
Expand Down
1 change: 1 addition & 0 deletions src/qs_overlap.F
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ SUBROUTINE build_overlap_matrix_low(ks_env, matrix_s, matrixkp_s, matrix_name, n
END IF
maxs = maxder

use_virial = .FALSE.
IF (do_forces) THEN
CALL get_ks_env(ks_env=ks_env, force=force, virial=virial)
use_virial = virial%pv_availability .AND. (.NOT. virial%pv_numer)
Expand Down

0 comments on commit 698770d

Please sign in to comment.