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 <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
Ján Tomko 2021-12-13 13:29:06 +01:00
parent 7d825985b4
commit d47a4bfa7b

View File

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