Skip to content

Commit

Permalink
fix: free instead of delete for malloc'd mem
Browse files Browse the repository at this point in the history
  • Loading branch information
hellkite500 committed Jun 13, 2024
1 parent 18580d7 commit 1914cd8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lgar.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1138,8 +1138,8 @@ extern void lgar_move_wetting_fronts(double timestep_h, double *volin_cm, int wf
delta_thetas, delta_thickness, soil_type, soil_properties);
actual_ET_demand = *AET_demand_cm;
//done with delta_thetas and delta_thickness, cleanup memory
delete delta_thetas;
delete delta_thickness;
free(delta_thetas);
free(delta_thickness);
current->theta = fmax(theta_r, fmin(theta_new, theta_e));

double Se = calc_Se_from_theta(current->theta,theta_e,theta_r);
Expand Down

0 comments on commit 1914cd8

Please sign in to comment.