aboutsummaryrefslogtreecommitdiff
path: root/src/fit.c
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2018-09-18 10:35:20 -0500
committertlatorre <tlatorre@uchicago.edu>2018-09-18 10:35:20 -0500
commit81953f2131f8badd065f82585c7c06edf3c5d1e1 (patch)
tree291f393bdbfcd31fc995c2c5c1747efa1ec32bae /src/fit.c
parent833819200e38b1e6386e62bbf28cc8f5c78d2e05 (diff)
downloadsddm-81953f2131f8badd065f82585c7c06edf3c5d1e1.tar.gz
sddm-81953f2131f8badd065f82585c7c06edf3c5d1e1.tar.bz2
sddm-81953f2131f8badd065f82585c7c06edf3c5d1e1.zip
add free_charge() to free memory used to interpolate the charge distributions
Diffstat (limited to 'src/fit.c')
-rw-r--r--src/fit.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/fit.c b/src/fit.c
index 30e27f1..339eeba 100644
--- a/src/fit.c
+++ b/src/fit.c
@@ -5467,6 +5467,7 @@ int main(int argc, char **argv)
}
free_interpolation();
+ free_charge();
pmt_response_free();
db_free(db);
@@ -5478,7 +5479,15 @@ int main(int argc, char **argv)
return 0;
err:
+ free_interpolation();
+ free_charge();
+ pmt_response_free();
+
+ db_free(db);
+
+ if (fout) fclose(fout);
zebra_close(f);
+
return 1;
}