mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
qemu: Use g_autofree in qemuMigrationSrcConnect
Signed-off-by: Martin Kletzander <mkletzan@redhat.com> Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
8abd1ffed1
commit
ae200449fe
@ -3369,7 +3369,7 @@ qemuMigrationSrcConnect(virQEMUDriverPtr driver,
|
||||
{
|
||||
virNetSocketPtr sock;
|
||||
const char *host;
|
||||
char *port = NULL;
|
||||
g_autofree char *port = NULL;
|
||||
int ret = -1;
|
||||
|
||||
host = spec->dest.host.name;
|
||||
@ -3400,7 +3400,6 @@ qemuMigrationSrcConnect(virQEMUDriverPtr driver,
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
VIR_FREE(port);
|
||||
if (ret < 0)
|
||||
VIR_FORCE_CLOSE(spec->dest.fd.qemu);
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user