diff options
author | George Burgess IV <gbiv@google.com> | 2021-01-20 17:24:45 -0800 |
---|---|---|
committer | George Burgess IV <gbiv@google.com> | 2021-01-20 17:27:08 -0800 |
commit | 3c97e6a7d95653d81a00cc1f2274270fc577ec0d (patch) | |
tree | 47cb2a3537dd52737620ccabb1d0ea07badce960 /opengl/java | |
parent | 0f4112a7608d5773e0eeb9bf072b184615e4da08 (diff) |
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
Diffstat (limited to 'opengl/java')
0 files changed, 0 insertions, 0 deletions