Skip to content

Commit

Permalink
Fix possible memory leak.
Browse files Browse the repository at this point in the history
  • Loading branch information
elbriggs committed Jan 27, 2023
1 parent d393d3d commit b314051
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion RMG/Common/GetAugRho.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,11 @@ template <typename KpointType> void GetAugRho(Kpoint<KpointType> **Kpts, double

int factor = ct.noncoll_factor * ct.noncoll_factor;
for(int idx = 0;idx < pbasis*factor;idx++) augrho[idx] = 0.0;
if(ct.norm_conserving_pp) return;

double *taugrho = new double[pbasis*factor]();


if(ct.norm_conserving_pp) return;

std::complex<double> *product = new std::complex<double>[max_product * factor];
std::complex<double> *product_tem = new std::complex<double>[max_product * factor];
Expand Down

0 comments on commit b314051

Please sign in to comment.