summaryrefslogtreecommitdiff
path: root/tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp
diff options
context:
space:
mode:
authorGeorge Burgess IV <gbiv@google.com>2019-01-29 19:30:40 -0800
committerGeorge Burgess IV <gbiv@google.com>2019-01-29 20:51:44 -0800
commit20d18966bcd1ed01b95a2643695a6aeb1afc273c (patch)
tree43cffac1fc6f79c02bade07a80fd9236f7768520 /tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp
parent0544b1ac87ab6ff4ef95344f39f13f67533ab8e5 (diff)
media: Silence an analyzer complaint; clean up code
The static analyzer is complaining about a memory leak when we create this unique pointer. This appears to just be a case of the analyzer not properly modelling returned temporaries. While I'm in the area, unique_ptr<T, decltype(free)> is generally an antipattern: if we instead use an empty struct with an attached operator(), the unique_ptr shrinks to sizeof(void *) bytes (instead of sizeof(void *) * 2), and the compiler no longer has to indirectly call free(). As luck would have it, this small refactor makes the analyzer stop complaining about this code. Bug: None Test: Ran the static analyzer. It's happier, and this builds. Change-Id: I0c98860e2169ceb8e9d21e577cad89d1ef2c6ff9
Diffstat (limited to 'tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp')
0 files changed, 0 insertions, 0 deletions