aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-05-31 16:23:27 +0200
committerThomas White <taw@physics.org>2010-05-31 16:23:27 +0200
commita3de086613dd7f2098be05908544b1ff2d9fd432 (patch)
tree8c7b3c002d286e650d75ad9f32579c8206b31489 /src
parent9599196f61035a43b4c7ce1b3febc85f63d3e9d2 (diff)
Fix memory leak once more...
Diffstat (limited to 'src')
-rw-r--r--src/indexamajig.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c
index 800430ba..6cf9cd15 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -306,6 +306,12 @@ static void *process_image(void *pargsv)
/* Perform 'fine' peak search */
search_peaks(&image);
+
+ /* Get rid of noise-filtered version at this point
+ * - it was strictly for the purposes of peak detection. */
+ free(image.data);
+ image.data = data_for_measurement;
+
if ( image_feature_count(image.features) < 5 ) goto done;
if ( config_dumpfound ) dump_peaks(&image, pargs->output_mutex);
@@ -335,10 +341,6 @@ static void *process_image(void *pargsv)
result->peaks_sane = 1;
}
- /* Get rid of noise-filtered version at this point */
- free(image.data);
- image.data = data_for_measurement;
-
/* Measure intensities if requested */
if ( config_nearbragg ) {
output_intensities(&image, image.indexed_cell,