Fix memory leaks appearing when cvOpenFileStorage throws

I'm not sure why a C function throws in the first place, but changing that would probably be too backwards-incompatible (not to mention time-consuming).
Maybe `xml_buf` (line 2825) should also be freed here?