Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c46fb64 authored by George Burgess IV's avatar George Burgess IV
Browse files

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
parent 7e9249d6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment