aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2017-05-26 10:33:47 +0200
committerThomas White <taw@physics.org>2017-06-21 14:26:15 +0200
commit054fefd62406a76711cb8ddaa5d2e5e9271570a0 (patch)
tree272877532a90734074018c75fbf36fb248259b06
parent38c560f7fc99383883890d746e74bd774a0309c7 (diff)
hdf5_read2(): Fix exit path
Bad pixel map is not allocated at this point.
-rw-r--r--libcrystfel/src/hdf5-file.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libcrystfel/src/hdf5-file.c b/libcrystfel/src/hdf5-file.c
index dc86d641..77a69dbd 100644
--- a/libcrystfel/src/hdf5-file.c
+++ b/libcrystfel/src/hdf5-file.c
@@ -1881,9 +1881,8 @@ int hdf5_read2(struct hdfile *f, struct image *image, struct event *ev,
free(f_offset);
free(f_count);
for ( i=0; i<=pi; i++ ) {
- free(image->dp[pi]);
- free(image->sat[pi]);
- free(image->bad[pi]);
+ free(image->dp[i]);
+ free(image->sat[i]);
}
free(image->dp);
free(image->bad);