OSDN Git Service

app_main: silence static analyzer warnings
authorGeorge Burgess IV <gbiv@google.com>
Wed, 12 Jul 2017 00:18:26 +0000 (17:18 -0700)
committerGeorge Burgess IV <gbiv@google.com>
Wed, 12 Jul 2017 00:28:15 +0000 (17:28 -0700)
commitc29844d07236c5569663a9e0406943652b674959
tree12a38637759f0003cfe800f2677b4384ba1a0a7d
parented3e6d47ffa3be00b7dadc4ac82ae5c3d49b0146
app_main: silence static analyzer warnings

This silences two warnings:

frameworks/base/cmds/app_process/app_main.cpp:238:11: warning: Potential
memory leak

frameworks/base/cmds/app_process/app_main.cpp:261:9: warning: Potential
memory leak

As the (existing) comment notes, we nuke argv later in main(), so these
copies are necessary. Since these args need to live for basically the
entire life of the process, it seems pointless to go out of our way to
free them.

Bug: 27101951
Test: mma. Static analyzer warnings are gone.
Change-Id: Icbfabfede9db909f6acb274b697cb6076c3fc11f
cmds/app_process/app_main.cpp