qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 15/16] vl: Clean up -smp error handling


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 15/16] vl: Clean up -smp error handling
Date: Tue, 20 Jul 2021 20:07:23 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 7/20/21 2:54 PM, Markus Armbruster wrote:
> 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>
> ---
>  softmmu/vl.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]