aboutsummaryrefslogtreecommitdiff
path: root/src/process_image.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-07-24 15:48:31 +0200
committerThomas White <taw@physics.org>2019-07-24 15:48:56 +0200
commit4ec853ed760c56adee24a19b5b3c81ebe12e8457 (patch)
treedc38a16251158af506588e531bc14913ae93061a /src/process_image.c
parent7dd1c93b72e206f3dcb2511beb51ecf7167d75dd (diff)
indexamajig: Free spectrum if it was generated for this image
Diffstat (limited to 'src/process_image.c')
-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]);