mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
qemuBuildShmemCommandLine: use VIR_AUTOFREE for devstr
Now that it's only used once. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
a74e7270d8
commit
641b649d6d
@ -9144,7 +9144,7 @@ qemuBuildShmemCommandLine(virLogManagerPtr logManager,
|
||||
{
|
||||
VIR_AUTOPTR(virJSONValue) memProps = NULL;
|
||||
VIR_AUTOCLEAN(virBuffer) buf = VIR_BUFFER_INITIALIZER;
|
||||
char *devstr = NULL;
|
||||
VIR_AUTOFREE(char *) devstr = NULL;
|
||||
VIR_AUTOFREE(char *) chardev = NULL;
|
||||
int rc;
|
||||
unsigned int cdevflags = QEMU_BUILD_CHARDEV_TCP_NOWAIT |
|
||||
@ -9207,13 +9207,10 @@ qemuBuildShmemCommandLine(virLogManagerPtr logManager,
|
||||
if (!devstr)
|
||||
return -1;
|
||||
|
||||
if (qemuCommandAddExtDevice(cmd, &shmem->info) < 0) {
|
||||
VIR_FREE(devstr);
|
||||
if (qemuCommandAddExtDevice(cmd, &shmem->info) < 0)
|
||||
return -1;
|
||||
}
|
||||
|
||||
virCommandAddArgList(cmd, "-device", devstr, NULL);
|
||||
VIR_FREE(devstr);
|
||||
|
||||
if (shmem->server.enabled) {
|
||||
chardev = qemuBuildChrChardevStr(logManager, secManager,
|
||||
|
Loading…
Reference in New Issue
Block a user