BUG 14681: Allow for early exit when no data can be decoded.

Change-Id: If4c8bae0d8811a42b1606dc5f48108508739df4e
BUG 14681: Close leftover file handles on exit

Change-Id: Ieeb25882def680e1a0c84c71583fe6fb4ebce54e
Merge topic 'fix-14681-xml-crash-on-bad-input' into master

2433c366 BUG 14681: Close leftover file handles on exit
b9c82459 BUG 14681: Allow for early exit when no data can be decoded.