aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-06-11 16:26:22 +0200
committerThomas White <taw@physics.org>2020-07-29 18:53:44 +0200
commit9f809658421e6f0280a68f846341170cf7596938 (patch)
tree397990b045bf39295f7220d10efc0bf828031b22 /src
parenta0354c7b12c3203509bec884d56a0a90784b95a4 (diff)
Fix some memory bugs
Diffstat (limited to 'src')
-rw-r--r--src/process_image.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/process_image.c b/src/process_image.c
index d87f2cff..bec73a08 100644
--- a/src/process_image.c
+++ b/src/process_image.c
@@ -439,16 +439,10 @@ out:
sb_shared->n_hadcrystals += any_crystals;
pthread_mutex_unlock(&sb_shared->totals_lock);
- for ( i=0; i<image->n_crystals; i++ ) {
- cell_free(crystal_get_cell(image->crystals[i]));
- reflist_free(crystal_get_reflections(image->crystals[i]));
- crystal_free(image->crystals[i]);
- }
- free(image->crystals);
-
/* Free spectrum only if we generated it for this image */
if ( iargs->spectrum == NULL ) {
spectrum_free(image->spectrum);
+ image->spectrum = NULL;
}
/* Free image (including detgeom) */