Fixed possible leaks in ElementTree parser.