From a280fa09fcfc11afd1db610ea183995df5d3267d Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 26 Jul 2023 14:45:29 +0200 Subject: intcontext_free: Free the intcontext structure itself --- libcrystfel/src/integration.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libcrystfel') diff --git a/libcrystfel/src/integration.c b/libcrystfel/src/integration.c index 9c5ab7da..8b05efe7 100644 --- a/libcrystfel/src/integration.c +++ b/libcrystfel/src/integration.c @@ -547,6 +547,7 @@ void intcontext_free(struct intcontext *ic) free(ic->reference_den); free(ic->n_profiles_in_reference); free(ic->bm); + free(ic); } @@ -1627,8 +1628,6 @@ static void integrate_rings(IntegrationMethod meth, term_lock); } - intcontext_free(ic); - if ( n_rej*4 > n_refl ) { ERROR("WARNING: %i reflections could not be integrated\n", n_rej); @@ -1636,6 +1635,8 @@ static void integrate_rings(IntegrationMethod meth, crystal_set_num_saturated_reflections(cr, ic->n_saturated); crystal_set_num_implausible_reflections(cr, ic->n_implausible); + + intcontext_free(ic); } -- cgit v1.2.3