cleanup XML_Parser after reading android config files.

This CL is based on one submitted for AOSP review...
 Fix memory leak in parseConfigFile()
 Need to call XML_ParserFree() on parsers created by XML_ParserCreate()
 Signed-off-by: Carton He <carton.he@marvell.com>
 https://android-review.googlesource.com/#/c/65690/1

R=mtklein@google.com

Review URL: https://codereview.chromium.org/24171003

git-svn-id: http://skia.googlecode.com/svn/trunk@11357 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
djsollen@google.com 2013-09-18 18:59:29 +00:00
parent 5898dce287
commit 286a8830f5

View File

@ -219,6 +219,7 @@ static void parseConfigFile(const char *filename, SkTDArray<FontFamily*> &famili
}
XML_Parse(parser, buffer, len, done);
}
XML_ParserFree(parser);
fclose(file);
}