diff options
author | Peter Maydell | 2014-03-12 14:06:00 +0100 |
---|---|---|
committer | Riku Voipio | 2014-03-17 10:44:31 +0100 |
commit | 7f72cd235fa33f2fc7a8d1cc4d621bf7db61e9eb (patch) | |
tree | b848ff56cf03cf8f1087b2b2fdaa6eab9468abcc | |
parent | Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-03-15' in... (diff) | |
download | qemu-7f72cd235fa33f2fc7a8d1cc4d621bf7db61e9eb.tar.gz qemu-7f72cd235fa33f2fc7a8d1cc4d621bf7db61e9eb.tar.xz qemu-7f72cd235fa33f2fc7a8d1cc4d621bf7db61e9eb.zip |
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 <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
-rw-r--r-- | linux-user/signal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-user/signal.c b/linux-user/signal.c index 24c91f37d9..209855efcb 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) { |