aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcrystfel/src/hdf5-file.c3
-rw-r--r--libcrystfel/src/xgandalf.c1
2 files changed, 4 insertions, 0 deletions
diff --git a/libcrystfel/src/hdf5-file.c b/libcrystfel/src/hdf5-file.c
index 7b81b407..6ede34bc 100644
--- a/libcrystfel/src/hdf5-file.c
+++ b/libcrystfel/src/hdf5-file.c
@@ -2216,6 +2216,7 @@ char *hdfile_get_string_value(struct hdfile *f, const char *name,
case H5T_FLOAT :
r = hdfile_get_value(f, subst_name, ev, &buf_f,
H5T_NATIVE_DOUBLE);
+ free(subst_name);
if ( r == 0 ) {
tmp = malloc(256);
if ( tmp == NULL ) {
@@ -2233,6 +2234,7 @@ char *hdfile_get_string_value(struct hdfile *f, const char *name,
case H5T_INTEGER :
r = hdfile_get_value(f, subst_name, ev, &buf_i,
H5T_NATIVE_INT);
+ free(subst_name);
if ( r == 0 ) {
tmp = malloc(256);
if ( tmp == NULL ) {
@@ -2250,6 +2252,7 @@ char *hdfile_get_string_value(struct hdfile *f, const char *name,
default :
ERROR("Don't know what to do!\n");
+ free(subst_name);
return NULL;
}
diff --git a/libcrystfel/src/xgandalf.c b/libcrystfel/src/xgandalf.c
index 2434ce2e..5f31df33 100644
--- a/libcrystfel/src/xgandalf.c
+++ b/libcrystfel/src/xgandalf.c
@@ -253,6 +253,7 @@ void xgandalf_cleanup(void *pp)
if(xgandalf_private_data->uncenteringTransformation != NULL){
tfn_free(xgandalf_private_data->uncenteringTransformation);
}
+ free(xgandalf_private_data);
}
static void reduceCell(UnitCell *cell, LatticeTransform_t* appliedReductionTransform)