Skip to content
Commit 3c97e6a7 authored by George Burgess IV's avatar George Burgess IV
Browse files

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
parent 0f4112a7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment