From: Ján Tomko Date: Mon, 13 Dec 2021 12:29:06 +0000 (+0100) Subject: qemu: qemuBuildChardevCommand: use chrSourcePriv unconditionally X-Git-Tag: v8.0.0-rc1~250 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d47a4bfa7b602cbb764076a685cebb920d00555a;p=thirdparty%2Flibvirt.git qemu: qemuBuildChardevCommand: use chrSourcePriv unconditionally In the QEMU driver, we allocate private source data unconditionally for every chardev and the rest of the function just assumes it's there. Signed-off-by: Ján Tomko Reviewed-by: Peter Krempa --- diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 613f7a5d2a..0017cf6ca7 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1493,7 +1493,7 @@ qemuBuildChardevCommand(virCommand *cmd, * secinfo is added only to a TCP serial device during * qemuDomainSecretChardevPrepare. Subsequently called * functions can just check the config fields */ - if (chrSourcePriv && chrSourcePriv->secinfo) { + if (chrSourcePriv->secinfo) { if (qemuBuildObjectSecretCommandLine(cmd, chrSourcePriv->secinfo, qemuCaps) < 0)