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;
|
virNetSocketPtr sock;
|
||||||
const char *host;
|
const char *host;
|
||||||
char *port = NULL;
|
g_autofree char *port = NULL;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
host = spec->dest.host.name;
|
host = spec->dest.host.name;
|
||||||
@ -3400,7 +3400,6 @@ qemuMigrationSrcConnect(virQEMUDriverPtr driver,
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(port);
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
VIR_FORCE_CLOSE(spec->dest.fd.qemu);
|
VIR_FORCE_CLOSE(spec->dest.fd.qemu);
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user