aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/xds.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2015-06-26 17:05:37 +0200
committerThomas White <taw@physics.org>2015-06-26 17:57:15 +0200
commitf0a96798696fe08a4c45a8ea41a8175faf13774a (patch)
treed03b6314d81823d034a88f661681697d6d286f4b /libcrystfel/src/xds.c
parentd19afd914f7844945b0a44ef2fcb0def29f92046 (diff)
Plug some more leaks
Diffstat (limited to 'libcrystfel/src/xds.c')
-rw-r--r--libcrystfel/src/xds.c10
1 files changed, 7 insertions, 3 deletions
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);