aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-06-02 13:06:45 +0200
committerThomas White <taw@physics.org>2020-07-29 18:42:57 +0200
commitc2dbe1c68edbc46db0faba679ff7888a40f1023b (patch)
treea911667d9e3f7778c6a25f5a111a80c9163a1a05 /libcrystfel
parent4c8f86c583b203fa4098b8e116a1d50cb435d883 (diff)
image_free: Free detgeom as well
NB Don't free the old "detector" struct. This has different semantics: Detgeom is allocated when the image is created (e.g. by loading a file). Detector is usually owned by someone else.
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/image.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c
index 22ee7467..898f4863 100644
--- a/libcrystfel/src/image.c
+++ b/libcrystfel/src/image.c
@@ -1600,6 +1600,7 @@ void image_free(struct image *image)
if ( image->detgeom != NULL ) {
np = image->detgeom->n_panels;
+ detgeom_free(image->detgeom);
} else if ( image->det != NULL ) {
np = image->det->n_panels;
} else {