commit | 5c46fb648623c02efb9df0796a791d4a6dcc8b77 | [log] [tgz] |
---|---|---|
author | George Burgess IV <gbiv@google.com> | Mon Mar 16 12:07:30 2020 -0700 |
committer | George Burgess IV <gbiv@google.com> | Mon Mar 16 12:08:51 2020 -0700 |
tree | 6ab4256f30f02c20a9f86b5cb1cc6571ae33522f | |
parent | 7e9249d6a8d13f2535936797210266a1b11d1bf3 [diff] |
screencap: fix a memory leak If fork fails, we'll leak this strdup. The strdup here seems unnecessary; just use a pointer to the string itself instead. Caught by the static analyzer: frameworks/base/cmds/screencap/screencap.cpp:119:8: warning: Potential leak of memory pointed to by 'fp_arg' [clang-analyzer-unix.Malloc] Bug: None Test: TreeHugger Change-Id: Id7c738ed5c090bcb5b13a6258e91f027ff2b778c