XML parser results: clears the temporary data buffer while parsing

Avoids indefinitely increasing memory consumption
pull/407/head
Tpt 2 years ago
parent 26bad1f3a4
commit ac5e0e7c08
  1. 2
      lib/sparesults/src/xml.rs

@ -260,6 +260,7 @@ impl<R: BufRead> XmlQueryResultsReader<R> {
Event::Eof => return Err(SyntaxError::msg("Unexpected early file end. All results file should have a <head> and a <result> or <boolean> tag").into()), Event::Eof => return Err(SyntaxError::msg("Unexpected early file end. All results file should have a <head> and a <result> or <boolean> tag").into()),
_ => (), _ => (),
} }
buffer.clear();
} }
} }
} }
@ -533,6 +534,7 @@ impl<R: BufRead> XmlSolutionsReader<R> {
Event::Eof => return Ok(None), Event::Eof => return Ok(None),
_ => (), _ => (),
} }
self.buffer.clear();
} }
} }
} }

Loading…
Cancel
Save