Skip to content

Commit

Permalink
fix a memory leak in LR constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
maki49 committed Jul 25, 2024
1 parent f8f3f0f commit 78b4b27
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions source/module_lr/esolver_lrtd_lcao.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ LR::ESolver_LR<T, TR>::ESolver_LR(ModuleESolver::ESolver_KS_LCAO<T, TR>&& ks_sol
this->set_gint();

// move pw basis
delete this->pw_rho; // newed in ESolver_FP::ESolver_FP
this->pw_rho = ks_sol.pw_rho;
ks_sol.pw_rho = nullptr;
//init potential and calculate kernels using ground state charge
Expand Down

0 comments on commit 78b4b27

Please sign in to comment.