aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/image-cbf.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-07-21 12:11:42 +0200
committerThomas White <taw@physics.org>2021-07-21 15:34:33 +0200
commit760f17f56b7f79f67a9029cbe7cc55a0acccd3b9 (patch)
tree608a86b923abe5564c7d1624f54fdf9b90b9a6ee /libcrystfel/src/image-cbf.c
parent6d94d4115c254d344bbb927596a7141ef39fd298 (diff)
Make sure that memory gets freed on realloc failure
Diffstat (limited to 'libcrystfel/src/image-cbf.c')
-rw-r--r--libcrystfel/src/image-cbf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcrystfel/src/image-cbf.c b/libcrystfel/src/image-cbf.c
index 1e5659f4..8a97cc6d 100644
--- a/libcrystfel/src/image-cbf.c
+++ b/libcrystfel/src/image-cbf.c
@@ -307,7 +307,7 @@ static float *read_cbf_data(const char *filename, int gz, int *w, int *h)
if ( len_read == bufinc ) {
bufsz += bufinc;
- buf = realloc(buf, bufsz);
+ buf = srealloc(buf, bufsz);
if ( buf == NULL ) return NULL;
}