|
@@ -5237,7 +5237,7 @@ static int __init init_binder_device(const char *name)
|
|
|
static int __init binder_init(void)
|
|
|
{
|
|
|
int ret;
|
|
|
- char *device_name, *device_names;
|
|
|
+ char *device_name, *device_names, *device_tmp;
|
|
|
struct binder_device *device;
|
|
|
struct hlist_node *tmp;
|
|
|
|
|
@@ -5288,7 +5288,8 @@ static int __init binder_init(void)
|
|
|
}
|
|
|
strcpy(device_names, binder_devices_param);
|
|
|
|
|
|
- while ((device_name = strsep(&device_names, ","))) {
|
|
|
+ device_tmp = device_names;
|
|
|
+ while ((device_name = strsep(&device_tmp, ","))) {
|
|
|
ret = init_binder_device(device_name);
|
|
|
if (ret)
|
|
|
goto err_init_binder_device_failed;
|
|
@@ -5302,6 +5303,9 @@ err_init_binder_device_failed:
|
|
|
hlist_del(&device->hlist);
|
|
|
kfree(device);
|
|
|
}
|
|
|
+
|
|
|
+ kfree(device_names);
|
|
|
+
|
|
|
err_alloc_device_names_failed:
|
|
|
debugfs_remove_recursive(binder_debugfs_dir_entry_root);
|
|
|
|