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/xds.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'libcrystfel/src/xds.c') 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