Skip to content

Commit

Permalink
runstate: Initialize Error * to NULL
Browse files Browse the repository at this point in the history
Based on the description of error_setg(), the local variable err in
qemu_init_subsystems() should be initialized to NULL.

Fixes: efd7ab2 ("vl: extract qemu_init_subsystems")
Cc: qemu-stable@nongnu.org
Signed-off-by: Peng Liang <liangpeng10@huawei.com>
Message-Id: <20210610131729.3906565-1-liangpeng10@huawei.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
Peng Liang authored and bonzini committed Jun 14, 2021
1 parent 443e47a commit 7bc5333
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion softmmu/runstate.c
Expand Up @@ -747,7 +747,7 @@ static void qemu_run_exit_notifiers(void)

void qemu_init_subsystems(void)
{
Error *err;
Error *err = NULL;

os_set_line_buffering();

Expand Down

0 comments on commit 7bc5333

Please sign in to comment.