aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeng Liang <liangpeng10@huawei.com>2021-06-10 21:17:29 +0800
committerMichael Roth <michael.roth@amd.com>2021-10-14 16:01:30 -0500
commitd1000ee07b02c3a6f87a39b45d1b8c5689a14aa9 (patch)
tree787e9f1a892216d1cb7a010569c810100ed7c764
parentb6f5c02f5f757e0aec2869b336a3ea11ed5eec7c (diff)
downloadqemu-d1000ee07b02c3a6f87a39b45d1b8c5689a14aa9.zip
qemu-d1000ee07b02c3a6f87a39b45d1b8c5689a14aa9.tar.gz
qemu-d1000ee07b02c3a6f87a39b45d1b8c5689a14aa9.tar.bz2
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> (cherry picked from commit 6e1da3d305499d3907f3c7f6638243e2e09b5085) Signed-off-by: Michael Roth <michael.roth@amd.com>
-rw-r--r--softmmu/runstate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/softmmu/runstate.c b/softmmu/runstate.c
index ce8977c..5471310 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();