aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/indexers
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/indexers
parent6d94d4115c254d344bbb927596a7141ef39fd298 (diff)
Make sure that memory gets freed on realloc failure
Diffstat (limited to 'libcrystfel/src/indexers')
-rw-r--r--libcrystfel/src/indexers/taketwo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcrystfel/src/indexers/taketwo.c b/libcrystfel/src/indexers/taketwo.c
index cd4d87a6..72aa0bad 100644
--- a/libcrystfel/src/indexers/taketwo.c
+++ b/libcrystfel/src/indexers/taketwo.c
@@ -1751,7 +1751,7 @@ static int match_obs_to_cell_vecs(struct TheoryVec *cell_vecs, int cell_vec_coun
/* we have a match, add to array! */
size_t new_size = (count+1)*sizeof(struct sortme);
- for_sort = realloc(for_sort, new_size);
+ for_sort = srealloc(for_sort, new_size);
if ( for_sort == NULL ) return 0;