From edf2e9869600d1779383317f4b2f661faff9a0e3 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 2 Sep 2019 16:59:46 +0200 Subject: get_detector_geometry_from_string: Fix memory leaks --- libcrystfel/src/detector.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'libcrystfel') diff --git a/libcrystfel/src/detector.c b/libcrystfel/src/detector.c index 5055139f..201b9041 100644 --- a/libcrystfel/src/detector.c +++ b/libcrystfel/src/detector.c @@ -1270,12 +1270,16 @@ struct detector *get_detector_geometry_from_string(const char *string, done = 1; } - if ( line[0] == ';' ) continue; + if ( line[0] == ';' ) { + free(line); + continue; + } n1 = assplode(line, " \t", &bits, ASSPLODE_NONE); if ( n1 < 3 ) { for ( i=0; i