Commit a3de0866 authored by Thomas White's avatar Thomas White
Browse files

Fix memory leak once more...

parent 9599196f
......@@ -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,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment