aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-01-27 16:29:17 +0100
committerThomas White <taw@physics.org>2021-01-27 16:29:17 +0100
commite195bf16a5d93c97018516e89d84960bf4fd8145 (patch)
tree639faccdcea8cd060f6c6d49534644200d6cbc29 /libcrystfel/src
parent1ea31bb393d7f39fd19ea1f34de12de02a32f1b8 (diff)
DataTemplate: fix some small memory leaks
Diffstat (limited to 'libcrystfel/src')
-rw-r--r--libcrystfel/src/datatemplate.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libcrystfel/src/datatemplate.c b/libcrystfel/src/datatemplate.c
index ec9f8751..b92fcb0a 100644
--- a/libcrystfel/src/datatemplate.c
+++ b/libcrystfel/src/datatemplate.c
@@ -528,6 +528,7 @@ static int parse_field_for_panel(struct panel_template *panel, const char *key,
ERROR("Invalid data location '%s'\n", val);
reject = -1;
}
+ free(panel->data);
panel->data = strdup(val);
} else if ( strcmp(key, "mask") == 0 ) {
@@ -1296,7 +1297,7 @@ DataTemplate *data_template_new_from_string(const char *string_in)
free(defaults.cnz_from);
free(defaults.data);
free(defaults.mask);
-
+ free(defaults.mask_file);
for ( rgi=0; rgi<n_rg_definitions; rgi++) {
@@ -1395,6 +1396,7 @@ void data_template_free(DataTemplate *dt)
for ( i=0; i<dt->n_panels; i++ ) {
free(dt->panels[i].name);
+ free(dt->panels[i].data);
free(dt->panels[i].mask);
free(dt->panels[i].mask_file);
free(dt->panels[i].satmap);