From 4ef78fa8848b4a6fc60268431492d1502454fb5e Mon Sep 17 00:00:00 2001 From: Nick Kralevich <nnk@google.com> Date: Fri, 5 Nov 2010 11:47:12 -0700 Subject: [PATCH] staging: binder: Fix use of uninitialized variable. Under an extremely rare condition, the variable return_error may not be set. This patch initializes the value to a known "bad" value, and checks before return to ensure return_error has been set. Signed-off-by: Nick Kralevich <nnk@google.com> --- drivers/staging/android/binder.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c index e13b4c483407..b0883fcfb910 100644 --- a/drivers/staging/android/binder.c +++ b/drivers/staging/android/binder.c @@ -1610,6 +1610,7 @@ static void binder_transaction(struct binder_proc *proc, proc->pid, thread->pid, fp->binder, node->debug_id, fp->cookie, node->cookie); + return_error = BR_FAILED_REPLY; goto err_binder_get_ref_for_node_failed; } ref = binder_get_ref_for_node(target_proc, node); -- GitLab