commit | bb8eb4b742b1325c64b42e0076df0e9ddad558b7 | [log] [tgz] |
---|---|---|
author | Zhizhou Yang <zhizhouy@google.com> | Tue Jul 18 15:28:58 2017 -0700 |
committer | Lennart Wieboldt <lennart.1997@gmx.de> | Mon Aug 14 12:36:17 2017 +0200 |
tree | 2b8b7396125da5dac82079fd10b885f254ba1f8e | |
parent | 88e1ed4c2046843dd380ffe7039cfee13173cde2 [diff] |
Fix clang static analyzer warning in libcore There are two potential memory leaks in libcore/luni/src/main/native/libcore_icu_NativeConverter.cpp. The callbackContext would not be deleted before returning if it was newly created. Fixed it by using an unique_ptr to manage it. Bug: 63876067 Test: mmm with static analyzer and warning disappears. Ran CTS test for CtsLibcoreTestCases and no new errors. Change-Id: If700a31fe10065a67e4aa4044fa47672d1dd6a0d