Commit 7d42043f authored by Christian Engelmayer's avatar Christian Engelmayer Committed by Greg Kroah-Hartman

staging: binder: fix usage of uninit scalar in binder_transaction()

Fix the error path when a cookie mismatch is detected. In that case the
function jumps to the exit label without setting the uninitialized, local
variable 'return_error'. Detected by Coverity - CID 201453.
Signed-off-by: default avatarChristian Engelmayer <cengelma@gmx.at>
Acked-by: default avatarArve <arve@android.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f994d835
...@@ -1547,6 +1547,7 @@ static void binder_transaction(struct binder_proc *proc, ...@@ -1547,6 +1547,7 @@ static void binder_transaction(struct binder_proc *proc,
proc->pid, thread->pid, proc->pid, thread->pid,
(u64)fp->binder, node->debug_id, (u64)fp->binder, node->debug_id,
(u64)fp->cookie, (u64)node->cookie); (u64)fp->cookie, (u64)node->cookie);
return_error = BR_FAILED_REPLY;
goto err_binder_get_ref_for_node_failed; goto err_binder_get_ref_for_node_failed;
} }
ref = binder_get_ref_for_node(target_proc, node); ref = binder_get_ref_for_node(target_proc, node);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment