diff options
author | bungeman <bungeman@google.com> | 2015-07-15 14:29:25 -0400 |
---|---|---|
committer | bungeman <bungeman@google.com> | 2015-07-15 14:29:25 -0400 |
commit | 91e51cbd64541c18fbf806b7bc347c0bc7faf322 (patch) | |
tree | 7de28d6191eea05dfa52b1f4d682931fdf5e137f | |
parent | 786ece17c3fac1aae670a6206ad4d11471a2488e (diff) |
Fix leak in Android FontMgr test.
FontMgrAndroidParserTest deos not free the font families it creates.
This issue was discovered by asan when enabling this test on Linux
platforms.
-rw-r--r-- | tests/FontMgrAndroidParserTest.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/FontMgrAndroidParserTest.cpp b/tests/FontMgrAndroidParserTest.cpp index fe689b01c4..5c282ed2a7 100644 --- a/tests/FontMgrAndroidParserTest.cpp +++ b/tests/FontMgrAndroidParserTest.cpp @@ -161,6 +161,7 @@ DEF_TEST(FontMgrAndroidParser, reporter) { } else { resourcesMissing = true; } + preV17FontFamilies.deleteAll(); SkTDArray<FontFamily*> v17FontFamilies; @@ -179,6 +180,7 @@ DEF_TEST(FontMgrAndroidParser, reporter) { } else { resourcesMissing = true; } + v17FontFamilies.deleteAll(); SkTDArray<FontFamily*> v22FontFamilies; @@ -196,6 +198,7 @@ DEF_TEST(FontMgrAndroidParser, reporter) { } else { resourcesMissing = true; } + v22FontFamilies.deleteAll(); if (resourcesMissing) { SkDebugf("---- Resource files missing for FontConfigParser test\n"); |