Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a03c6437 authored by Carlos Llamas's avatar Carlos Llamas
Browse files

ANDROID: fix ENOMEM check of binder_proc_ext



The check should be done against 'eproc' before it gets dereferenced.

Fixes: d49297739550 ("BACKPORT: binder: use euid from cred instead of using task")
Change-Id: Ief0c08212c4da8bdfdf628474de9dd30ee5a8db0
Signed-off-by: default avatarCarlos Llamas <cmllamas@google.com>
parent be021568
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -5944,9 +5944,9 @@ static int binder_open(struct inode *nodp, struct file *filp)
		     current->group_leader->pid, current->pid);

	eproc = kzalloc(sizeof(*eproc), GFP_KERNEL);
	proc = &eproc->proc;
	if (proc == NULL)
	if (eproc == NULL)
		return -ENOMEM;
	proc = &eproc->proc;
	spin_lock_init(&proc->inner_lock);
	spin_lock_init(&proc->outer_lock);
	get_task_struct(current->group_leader);