From: Kirill Shchetiniuk <[email protected]>
Signed-off-by: Kirill Shchetiniuk <[email protected]>
---
src/qemu/qemu_migration.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index de7b6a8abf..39beecc7e9 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -4348,7 +4348,7 @@ struct _qemuMigrationIOThread {
static void qemuMigrationSrcIOFunc(void *arg)
{
qemuMigrationIOThread *data = arg;
- char *buffer = NULL;
+ g_autofree char *buffer = NULL;
struct pollfd fds[2];
int timeout = -1;
virErrorPtr err = NULL;
@@ -4426,7 +4426,6 @@ static void qemuMigrationSrcIOFunc(void *arg)
goto error;
VIR_FORCE_CLOSE(data->sock);
- VIR_FREE(buffer);
return;
@@ -4445,7 +4444,6 @@ static void qemuMigrationSrcIOFunc(void *arg)
if (!virLastErrorIsSystemErrno(EPIPE))
virCopyLastError(&data->err);
virResetLastError();
- VIR_FREE(buffer);
}
--
2.49.0