From e8fa57ba93687fbd6841cb3a3d09c87037b5c713 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 10 Sep 2018 16:48:31 +0200 Subject: Make sure reflection contribution list gets freed --- src/merge.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/merge.c') diff --git a/src/merge.c b/src/merge.c index 3b850c30..9d36a359 100644 --- a/src/merge.c +++ b/src/merge.c @@ -3,11 +3,11 @@ * * Parallel weighted merging of intensities * - * Copyright © 2012-2015 Deutsches Elektronen-Synchrotron DESY, + * Copyright © 2012-2018 Deutsches Elektronen-Synchrotron DESY, * a research centre of the Helmholtz Association. * * Authors: - * 2010-2015 Thomas White + * 2010-2018 Thomas White * * This file is part of CrystFEL. * @@ -46,6 +46,7 @@ #include "cell.h" #include "utils.h" #include "reflist.h" +#include "reflist-utils.h" #include "cell-utils.h" @@ -319,6 +320,16 @@ RefList *merge_intensities(Crystal **crystals, int n, int n_threads, get_indices(refl, &h, &k, &l); r2 = add_refl(full2, h, k, l); copy_data(r2, refl); + + } else { + + /* We do not need the contribution list any more */ + struct reflection_contributions *c; + c = get_contributions(refl); + free(c->contribs); + free(c->contrib_crystals); + free(c); + } } -- cgit v1.2.3