aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2018-10-17 10:26:41 +0200
committerMarkus Armbruster <armbru@redhat.com>2018-10-19 14:51:34 +0200
commit6548459769e5e8b8d23a90ce0adffd067b240059 (patch)
treef60ffc5b273a74e0f882aae5bedda0ac692708a0 /vl.c
parentfff4c9c32595e71bca3d1a89beb0781a5be2201b (diff)
seccomp: Clean up error reporting in parse_sandbox()
Calling error_report() in a function that takes an Error ** argument is suspicious. parse_sandbox() does that, and then fails without setting an error. Its caller main(), via qemu_opts_foreach(), is fine with it, but clean it up anyway. Cc: Eduardo Otubo <otubo@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Eduardo Otubo <otubo@redhat.com> Message-Id: <20181017082702.5581-18-armbru@redhat.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vl.c b/vl.c
index db83cfe2e9..d7b604c97e 100644
--- a/vl.c
+++ b/vl.c
@@ -3973,8 +3973,8 @@ int main(int argc, char **argv, char **envp)
#ifdef CONFIG_SECCOMP
olist = qemu_find_opts_err("sandbox", NULL);
- if (olist && qemu_opts_foreach(olist, parse_sandbox, NULL, NULL)) {
- exit(1);
+ if (olist) {
+ qemu_opts_foreach(olist, parse_sandbox, NULL, &error_fatal);
}
#endif