aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2024-09-12 14:48:40 +0200
committerThomas White <taw@physics.org>2024-09-12 14:48:40 +0200
commit7a92e439357a782aa2a9f5b7f30b62dc237c8991 (patch)
tree62474cb24ca6b1d249c1314d00094cd2295adcf9
parentd36975f4be177094149314782f2cd70c88d226e8 (diff)
Close HDF5 files after failed mask load
-rw-r--r--libcrystfel/src/image-hdf5.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libcrystfel/src/image-hdf5.c b/libcrystfel/src/image-hdf5.c
index a148c307..8d8cd7da 100644
--- a/libcrystfel/src/image-hdf5.c
+++ b/libcrystfel/src/image-hdf5.c
@@ -650,6 +650,7 @@ int image_hdf5_read_satmap(struct panel_template *p,
sizeof(float), 1, map_location, NULL) )
{
ERROR("Failed to load saturation map data\n");
+ close_hdf5(fh);
return 1;
}
@@ -687,6 +688,7 @@ int image_hdf5_read_mask(struct panel_template *p,
sizeof(int), 1, mask_location, NULL) )
{
ERROR("Failed to load mask data\n");
+ close_hdf5(fh);
cffree(mask);
return 1;
}