aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2017-07-24 11:51:27 +0200
committerThomas White <taw@physics.org>2017-07-24 11:51:27 +0200
commit5458f4571c8856064e31d80d0b60eeebecb5f00b (patch)
tree945761dce037db025f76110403c954644c22120e /libcrystfel
parent27181a7b489f927c7bc7d485d4d87299d040a571 (diff)
Ensure TakeTwo arrays get freed
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/taketwo.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libcrystfel/src/taketwo.c b/libcrystfel/src/taketwo.c
index c269a44d..a012d91a 100644
--- a/libcrystfel/src/taketwo.c
+++ b/libcrystfel/src/taketwo.c
@@ -915,6 +915,8 @@ static int grow_network(gsl_matrix *rot, int obs_idx1, int obs_idx2,
while ( 1 ) {
if (start > obs_vec_count) {
+ free(obs_members);
+ free(match_members);
return 0;
}
@@ -926,6 +928,8 @@ static int grow_network(gsl_matrix *rot, int obs_idx1, int obs_idx2,
&match_found, cell);
if ( member_num < 2 ) {
+ free(obs_members);
+ free(match_members);
return 0;
}