From 6e1da3d305499d3907f3c7f6638243e2e09b5085 Mon Sep 17 00:00:00 2001 From: Peng Liang Date: Thu, 10 Jun 2021 21:17:29 +0800 Subject: [PATCH] runstate: Initialize Error * to NULL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Message-Id: <20210610131729.3906565-1-liangpeng10@huawei.com> Reviewed-by: Daniel P. Berrangé Signed-off-by: Paolo Bonzini --- softmmu/runstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/softmmu/runstate.c b/softmmu/runstate.c index 15640572c0..10d9b7365a 100644 --- a/softmmu/runstate.c +++ b/softmmu/runstate.c @@ -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();