Fix memory-leak warnings from the static analyzer
Warnings: frameworks/base/core/jni/android_view_InputChannel.cpp:145:5: warning: Potential memory leak jobject serverChannelObj = android_view_InputChannel_createInputChannel(env, ^~~~~~~~~~~~~~~~~~~~~~~~ frameworks/base/core/jni/android_view_InputChannel.cpp:151:5: warning: Potential memory leak jobject clientChannelObj = android_view_InputChannel_createInputChannel(env, ^~~~~~~~~~~~~~~~~~~~~~~~ The warnings were complaining about that we might leak nativeInputChannel, in android_view_InputChannel_createInputChannel, since we're allocating it as an arg and not always putting it somewhere. Bug: None Test: Builds without warnings Change-Id: I62163adee5d420ad78c8d4c74aafefc8a58f765b
Loading
Please register or sign in to comment