aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/process_image.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/process_image.c b/src/process_image.c
index 99b01eca..e9e90e71 100644
--- a/src/process_image.c
+++ b/src/process_image.c
@@ -492,6 +492,11 @@ out:
}
free(image.crystals);
+ /* Free spectrum only if we generated it for this image */
+ if ( iargs->spectrum == NULL ) {
+ spectrum_free(image.spectrum);
+ }
+
for ( i=0; i<image.det->n_panels; i++ ) {
free(image.dp[i]);
free(image.bad[i]);