From 7f72cd235fa33f2fc7a8d1cc4d621bf7db61e9eb Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Wed, 12 Mar 2014 13:06:00 +0000 Subject: linux-user/signal.c: Correct error path for AArch64 do_rt_sigreturn The error path in AArch64 do_rt_sigreturn() which fails before attempting lock_user_struct() was doing an unlock_user_struct() on an uninitialized variable. Initialize frame to NULL so we can use the same error-exit path in all cases (unlock of NULL is permitted and does nothing). Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index 24c91f3..209855e 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -1340,7 +1340,7 @@ static void setup_frame(int sig, struct target_sigaction *ka, long do_rt_sigreturn(CPUARMState *env) { - struct target_rt_sigframe *frame; + struct target_rt_sigframe *frame = NULL; abi_ulong frame_addr = env->xregs[31]; if (frame_addr & 15) { -- cgit v1.1