]> git.ipfire.org Git - thirdparty/qemu.git/commit - system/vl.c
vl: Clean up -smp error handling
authorMarkus Armbruster <armbru@redhat.com>
Tue, 20 Jul 2021 12:54:07 +0000 (14:54 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Thu, 26 Aug 2021 15:15:28 +0000 (17:15 +0200)
commitf9dfae9cb6b27649085f662a863f6167650402e0
tree27ff2b8d36668ef0dd27df822a4d923c7da3b97e
parentfff0e451f3ed3b73224ca91c84fbb13aeae9d844
vl: Clean up -smp error handling

The Error ** argument must be NULL, &error_abort, &error_fatal, or a
pointer to a variable containing NULL.  Passing an argument of the
latter kind twice without clearing it in between is wrong: if the
first call sets an error, it no longer points to NULL for the second
call.

machine_parse_property_opt() is wrong that way: it passes @errp to
keyval_parse() without checking for failure, then passes it to
keyval_merge().  Harmless, since the only caller passes &error_fatal.

Clean up: drop the parameter, and use &error_fatal directly.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210720125408.387910-16-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
[Rebased, conflict with commit a3c2f128306 resolved]
softmmu/vl.c