diff options
author | Thomas White <taw@physics.org> | 2015-06-26 17:05:37 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2015-06-26 17:57:15 +0200 |
commit | f0a96798696fe08a4c45a8ea41a8175faf13774a (patch) | |
tree | d03b6314d81823d034a88f661681697d6d286f4b /libcrystfel | |
parent | d19afd914f7844945b0a44ef2fcb0def29f92046 (diff) |
Plug some more leaks
Diffstat (limited to 'libcrystfel')
-rw-r--r-- | libcrystfel/src/integration.c | 1 | ||||
-rw-r--r-- | libcrystfel/src/xds.c | 10 |
2 files changed, 8 insertions, 3 deletions
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 <taw@physics.org> + * 2010-2015 Thomas White <taw@physics.org> * 2013 Cornelius Gati <cornelius.gati@cfel.de> * * 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); |