From f0a96798696fe08a4c45a8ea41a8175faf13774a Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 26 Jun 2015 17:05:37 +0200 Subject: Plug some more leaks --- libcrystfel/src/integration.c | 1 + libcrystfel/src/xds.c | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'libcrystfel') diff --git a/libcrystfel/src/integration.c b/libcrystfel/src/integration.c index 16c27bbe..c267b4a8 100644 --- a/libcrystfel/src/integration.c +++ b/libcrystfel/src/integration.c @@ -1533,6 +1533,7 @@ static double estimate_resolution(UnitCell *cell, ImageFeatureList *flist) if ( n_acc < 3 ) { STATUS("WARNING: Too few peaks to estimate resolution.\n"); + free(acc); return 0.0; } diff --git a/libcrystfel/src/xds.c b/libcrystfel/src/xds.c index b4f66740..40e2fd72 100644 --- a/libcrystfel/src/xds.c +++ b/libcrystfel/src/xds.c @@ -3,12 +3,12 @@ * * Invoke xds for crystal autoindexing * - * Copyright © 2013-2014 Deutsches Elektronen-Synchrotron DESY, + * Copyright © 2013-2015 Deutsches Elektronen-Synchrotron DESY, * a research centre of the Helmholtz Association. * Copyright © 2013 Cornelius Gati * * Authors: - * 2010-2014 Thomas White + * 2010-2015 Thomas White * 2013 Cornelius Gati * * This file is part of CrystFEL. @@ -519,11 +519,15 @@ int run_xds(struct image *image, IndexingPrivate *priv) if ( write_inp(image, xp) ) { ERROR("Failed to write XDS.INP file for XDS.\n"); + free(xds); return 0; } n = image_feature_count(image->features); - if (n < 25) return 0; + if ( n < 25 ) { + free(xds); + return 0; + } write_spot(image); -- cgit v1.2.3