From: Peng Liang Date: Thu, 10 Jun 2021 13:17:29 +0000 (+0800) Subject: runstate: Initialize Error * to NULL X-Git-Tag: v6.0.1~48 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d1000ee07b02c3a6f87a39b45d1b8c5689a14aa9;p=thirdparty%2Fqemu.git 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 Message-Id: <20210610131729.3906565-1-liangpeng10@huawei.com> Reviewed-by: Daniel P. Berrangé Signed-off-by: Paolo Bonzini (cherry picked from commit 6e1da3d305499d3907f3c7f6638243e2e09b5085) Signed-off-by: Michael Roth --- diff --git a/softmmu/runstate.c b/softmmu/runstate.c index ce8977c6a29..54713100c2e 100644 --- a/softmmu/runstate.c +++ b/softmmu/runstate.c @@ -746,7 +746,7 @@ static void qemu_run_exit_notifiers(void) void qemu_init_subsystems(void) { - Error *err; + Error *err = NULL; os_set_line_buffering();