summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author George Burgess IV <gbiv@google.com> 2022-10-06 15:55:34 -0700
committer George Burgess IV <gbiv@google.com> 2022-10-06 15:56:19 -0700
commit079077fd7707ff51243fc76e98adbc92bdd9f992 (patch)
treea831bb4c4af31ea8243d62d5273f8b7dfd13ac83 /libs/androidfw/StringPool.cpp
parent72154d309d4af6934121640b523816e14d0ceff4 (diff)
CursorWindow_test: fix leaks
`buf` isn't freed here. Convert it to either a unique_ptr or stack array, depending on size. Caught by the static analyzer: > frameworks/base/libs/androidfw/tests/CursorWindow_test.cpp:190:5: warning: Potential leak of memory pointed to by 'buf' [clang-analyzer-unix.Malloc] > frameworks/base/libs/androidfw/tests/CursorWindow_test.cpp:268:5: warning: Potential leak of memory pointed to by 'buf' [clang-analyzer-unix.Malloc] > frameworks/base/libs/androidfw/tests/CursorWindow_test.cpp:327:5: warning: Potential leak of memory pointed to by 'buf' [clang-analyzer-unix.Malloc] Bug: 206470603 Test: TreeHugger Change-Id: I6fee4a9c2eedce0385f794567b0083df24c63419
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions