]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: qemuBuildChardevCommand: use chrSourcePriv unconditionally
authorJán Tomko <jtomko@redhat.com>
Mon, 13 Dec 2021 12:29:06 +0000 (13:29 +0100)
committerJán Tomko <jtomko@redhat.com>
Mon, 13 Dec 2021 13:46:21 +0000 (14:46 +0100)
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>
src/qemu/qemu_command.c

index 613f7a5d2afcad21a067f054294f890709f9529d..0017cf6ca7afa3af2dd20613519dca6a1bfc142f 100644 (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)