commit | 4bdd5651813b17dcd895eaac9bde911126287fa5 | [log] [tgz] |
---|---|---|
author | Zhizhou Yang <zhizhouy@google.com> | Tue Jul 18 15:28:58 2017 -0700 |
committer | Zhizhou Yang <zhizhouy@google.com> | Tue Jul 25 15:16:48 2017 -0700 |
tree | 3a5f3446c6b68af78b9f71de6f1dfb133bf44320 | |
parent | fd39a95d431cd7892e5107e35b9ef9964704e87d [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