diff options
author | Thomas White <taw@physics.org> | 2021-07-21 12:11:42 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2021-07-21 15:34:33 +0200 |
commit | 760f17f56b7f79f67a9029cbe7cc55a0acccd3b9 (patch) | |
tree | 608a86b923abe5564c7d1624f54fdf9b90b9a6ee /libcrystfel/src/integration.c | |
parent | 6d94d4115c254d344bbb927596a7141ef39fd298 (diff) |
Make sure that memory gets freed on realloc failure
Diffstat (limited to 'libcrystfel/src/integration.c')
-rw-r--r-- | libcrystfel/src/integration.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcrystfel/src/integration.c b/libcrystfel/src/integration.c index 326e3183..2375388f 100644 --- a/libcrystfel/src/integration.c +++ b/libcrystfel/src/integration.c @@ -1588,7 +1588,7 @@ static double estimate_resolution(Crystal *cr, struct image *image) acc[n_acc++] = res; if ( n_acc == max_acc ) { max_acc += 1024; - acc = realloc(acc, max_acc*sizeof(double)); + acc = srealloc(acc, max_acc*sizeof(double)); if ( acc == NULL ) { ERROR("Allocation failed during" " estimate_resolution!\n"); |