From d47a4bfa7b602cbb764076a685cebb920d00555a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Mon, 13 Dec 2021 13:29:06 +0100 Subject: [PATCH] qemu: qemuBuildChardevCommand: use chrSourcePriv unconditionally MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/qemu/qemu_command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)