mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-06 17:17:56 +03:00
qemu_capabilities.c: use g_autoptr() in virQEMUCapsInitQMPSingle()
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Message-Id: <20200717211556.1024748-6-danielhb413@gmail.com> Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
494f72f786
commit
d32cde0ea2
@ -5382,7 +5382,7 @@ virQEMUCapsInitQMPSingle(virQEMUCapsPtr qemuCaps,
|
|||||||
gid_t runGid,
|
gid_t runGid,
|
||||||
bool onlyTCG)
|
bool onlyTCG)
|
||||||
{
|
{
|
||||||
qemuProcessQMPPtr proc = NULL;
|
g_autoptr(qemuProcessQMP) proc = NULL;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
if (!(proc = qemuProcessQMPNew(qemuCaps->binary, libDir,
|
if (!(proc = qemuProcessQMPNew(qemuCaps->binary, libDir,
|
||||||
@ -5401,7 +5401,6 @@ virQEMUCapsInitQMPSingle(virQEMUCapsPtr qemuCaps,
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
virQEMUCapsLogProbeFailure(qemuCaps->binary);
|
virQEMUCapsLogProbeFailure(qemuCaps->binary);
|
||||||
|
|
||||||
qemuProcessQMPFree(proc);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user