aboutsummaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-05-15 19:27:00 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2018-06-01 15:13:46 +0200
commit8347c18506c3f8619527d19134cb4aac071dc54a (patch)
treebf2a7edb036e4e91fcf22a8cadd2d6c97c6f27df /exec.c
parent4f938cbd90e7cf3004a6877ce579a11a87a4aa33 (diff)
exec.c: Initialize sa_flags passed to sigaction()
Coverity points out that in the user-only version of cpu_abort() we call sigaction() with a partially initialized struct sigaction (CID 1005351). Correct the omission. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20180515182700.31736-1-peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/exec.c b/exec.c
index ffa1099547..bd8833fc9d 100644
--- a/exec.c
+++ b/exec.c
@@ -1124,6 +1124,7 @@ void cpu_abort(CPUState *cpu, const char *fmt, ...)
struct sigaction act;
sigfillset(&act.sa_mask);
act.sa_handler = SIG_DFL;
+ act.sa_flags = 0;
sigaction(SIGABRT, &act, NULL);
}
#endif