From cee7ee0b8a4cafa1f8f3c67518f86c895520f5a6 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sat, 23 Sep 2023 19:20:52 +0200 Subject: image_create_dp_bad_sat: Don't worry about "sat" The saturation array is created by create_satmap when needed, which takes care that all panels get an array (so we only have to check image->sat != NULL). The array created by image_create_dp_bad_sat was actually leaked! In any case, saturation maps are rarely used. We can do without the extra allocations. The routine name has been changed accordingly, to prevent future confusion. --- libcrystfel/src/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libcrystfel/src/stream.c') diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c index f58ff05e..0273c69b 100644 --- a/libcrystfel/src/stream.c +++ b/libcrystfel/src/stream.c @@ -902,7 +902,7 @@ struct image *stream_read_chunk(Stream *st, StreamFlags srf) image_free(image); return NULL; } - image_create_dp_bad_sat(image, st->dtempl_read); + image_create_dp_bad(image, st->dtempl_read); image_set_zero_data(image, st->dtempl_read); } image->spectrum = spectrum_generate_gaussian(image->lambda, -- cgit v1.2.3