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
Loading
Please register or sign in to comment