From c2dbe1c68edbc46db0faba679ff7888a40f1023b Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 2 Jun 2020 13:06:45 +0200 Subject: 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. --- libcrystfel/src/image.c | 1 + 1 file changed, 1 insertion(+) 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 { -- cgit v1.2.3