runstate: Initialize Error * to NULL

Based on the description of error_setg(), the local variable err in
qemu_init_subsystems() should be initialized to NULL.

Fixes: efd7ab22fb ("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>
This commit is contained in:
Peng Liang 2021-06-10 21:17:29 +08:00 committed by Paolo Bonzini
parent 06b80795ee
commit 6e1da3d305

View File

@ -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();