From a8dde47090fe66bfa03b23c26cf4d7c882c79bb9 Mon Sep 17 00:00:00 2001 From: hellkite500 Date: Wed, 12 Jun 2024 20:51:20 -0600 Subject: [PATCH] fix: free instead of delete for malloc'd mem --- src/lgar.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lgar.cxx b/src/lgar.cxx index 900a3f8..491a8fb 100755 --- a/src/lgar.cxx +++ b/src/lgar.cxx @@ -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);