binder: free memory on error

commit 22eb9476b5 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Christian Brauner 2017-08-21 16:13:28 +02:00 • committed by Greg Kroah-Hartman
commit 5f9463ea02