Fix memory leaks in org_apache_harmony_xml_ExpatParser

The method expandInternedStringBucket(...) creates a new bucket
but the old bucket is never freed, even though the function doc
claims that it does. To solve this problem the old bucket is
freed when the new one has been created successfully.

Also this commit fixes two possible memory leaks when a
jniThrowOutOfMemoryError is thrown, where the internedString
also needs to be freed.

Change-Id: Ic80a35a2b4ec8f93ddc006aca5609a5ffe74d659
1 file changed