UPSTREAM: binder: free memory on error
authorChristian Brauner <christian.brauner@ubuntu.com>
Mon, 21 Aug 2017 14:13:28 +0000 (16:13 +0200)
committerMartijn Coenen <maco@android.com>
Tue, 17 Jul 2018 09:14:23 +0000 (11:14 +0200)
commit558ee9362338560772b003407a8440a08ce72899
tree11f0ca17f5197e1cd9f9321dbeef0ddb2f0dc386
parentfbb4339c024d65c9eadbfc664d82bf8c5307ac18
UPSTREAM: binder: free memory on error

On binder_init() the devices string is duplicated and smashed into individual
device names which are passed along. However, the original duplicated string
wasn't freed in case binder_init() failed. Let's free it on error.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 22eb9476b5d80a393ac0ba235c42bccc90b82c76)

Change-Id: I78fdeecf70c31ba4248b3de17130f97546288f84
drivers/android/binder.c