From 3b4819802b9168b8cb3333a517ed808e521a7531 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Thu, 21 Feb 2019 16:22:22 +0100 Subject: [PATCH] qemu: fix memory leak in qemuBuildDiskDeviceStr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit a1dce962 added the allocated scsiVPDDeviceId without freeing it. Signed-off-by: Ján Tomko --- 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 f511193fca..74f34af292 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1890,7 +1890,7 @@ qemuBuildDiskDeviceStr(const virDomainDef *def, const char *bus = virDomainDiskQEMUBusTypeToString(disk->bus); const char *contAlias; char *backendAlias = NULL; - char *scsiVPDDeviceId = NULL; + VIR_AUTOFREE(char *) scsiVPDDeviceId = NULL; int controllerModel; if (qemuCheckDiskConfig(disk, qemuCaps) < 0)