androidfw: use a vector instead of manually managing memory
The static analyzer caught a memory leak in this code: > frameworks/base/libs/androidfw/ResourceTypes.cpp:1042:45: warning: Potential leak of memory pointed to by 'convBuffer' [clang-analyzer-unix.Malloc] We can use a `std::vector` to hold our fixed-size, heap-allocated array. This will manage its own buffer for us. Bug: None Test: TreeHugger Change-Id: Ib83bdbc0bc60304747676e924f2ff549840aa861
Loading
Please register or sign in to comment