aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2023-07-26 14:45:29 +0200
committerThomas White <taw@physics.org>2023-07-26 15:41:23 +0200
commita280fa09fcfc11afd1db610ea183995df5d3267d (patch)
tree336de457fab79b2d7f8c1141b05d1dfb27443054 /libcrystfel
parent4038a12faab1ac3ef3e5c6aacd8850a58d8b9b2d (diff)
intcontext_free: Free the intcontext structure itself
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/integration.c5
1 files changed, 3 insertions, 2 deletions
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);
}