From 80457174459a48f1a073820582c964dcf65ab54b Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 19 Mar 2020 15:33:59 +0100 Subject: Check that dp/mask/sat exist before freeing --- libcrystfel/src/image.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libcrystfel') diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c index bae1d47b..00688f3e 100644 --- a/libcrystfel/src/image.c +++ b/libcrystfel/src/image.c @@ -1903,9 +1903,9 @@ void image_free(struct image *image) } for ( i=0; idp[i]); - free(image->sat[i]); - free(image->bad[i]); + if ( image->dp != NULL ) free(image->dp[i]); + if ( image->sat != NULL ) free(image->sat[i]); + if ( image->bad != NULL ) free(image->bad[i]); } free(image->dp); -- cgit v1.2.3