mirror of
https://github.com/choff/anbox-modules.git
synced 2026-11-08 10:25:50 +08:00
binder: free the shrinker when binder_init() fails
binder_init() registers the shrinker before init_binderfs(). On failure
the error path returns without binder_alloc_shrinker_exit(), and a failed
module init never runs binder_exit(). The module text is freed while the
shrinker stays registered.
Mainline fixed this in adb9743d6a08 ("binder: fix memory leak in
binder_init()"). Call the existing exit helper on
err_alloc_device_names_failed, which is only reached after a successful
shrinker init.
This commit is contained in:
parent
4d68f90e11
commit
aa2a988464
@ -6271,6 +6271,7 @@ err_init_binder_device_failed:
|
|||||||
|
|
||||||
err_alloc_device_names_failed:
|
err_alloc_device_names_failed:
|
||||||
debugfs_remove_recursive(binder_debugfs_dir_entry_root);
|
debugfs_remove_recursive(binder_debugfs_dir_entry_root);
|
||||||
|
binder_alloc_shrinker_exit();
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user