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.

Backports commit 8347c18506c3f8619527d19134cb4aac071dc54a from qemu
This commit is contained in:
Peter Maydell 2018-06-07 11:46:53 -04:00 committed by Lioncash
parent 533a3f6a6c
commit 76fd93726c
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -939,6 +939,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