[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 06/11] multifd/tls: fix memoryleak of the QIOChannelSocket object
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[PULL 06/11] multifd/tls: fix memoryleak of the QIOChannelSocket object when cancelling migration |
Date: |
Thu, 12 Nov 2020 18:37:53 +0000 |
From: Chuan Zheng <zhengchuan@huawei.com>
When creating new tls client, the tioc->master will be referenced which results
in socket
leaking after multifd_save_cleanup if we cancel migration.
Fix it by do object_unref() after tls client creation.
Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Chuan Zheng <zhengchuan@huawei.com>
Message-Id: <1605104763-118687-1-git-send-email-zhengchuan@huawei.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
migration/multifd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/migration/multifd.c b/migration/multifd.c
index 88486b90d6..45c690aa11 100644
--- a/migration/multifd.c
+++ b/migration/multifd.c
@@ -765,6 +765,7 @@ static void multifd_tls_channel_connect(MultiFDSendParams
*p,
return;
}
+ object_unref(OBJECT(ioc));
trace_multifd_tls_outgoing_handshake_start(ioc, tioc, hostname);
qio_channel_set_name(QIO_CHANNEL(tioc), "multifd-tls-outgoing");
p->c = QIO_CHANNEL(tioc);
--
2.28.0
- [PULL 00/11] migration queue, Dr. David Alan Gilbert (git), 2020/11/12
- [PULL 01/11] migration/ram: Fix hexadecimal format string specifier, Dr. David Alan Gilbert (git), 2020/11/12
- [PULL 02/11] ACPI: Avoid infinite recursion when dump-vmstate, Dr. David Alan Gilbert (git), 2020/11/12
- [PULL 03/11] migration/multifd: fix hangup with TLS-Multifd due to blocking handshake, Dr. David Alan Gilbert (git), 2020/11/12
- [PULL 04/11] migration: fix uninitialized variable warning in migrate_send_rp_req_pages(), Dr. David Alan Gilbert (git), 2020/11/12
- [PULL 05/11] migration/dirtyrate: simplify includes in dirtyrate.c, Dr. David Alan Gilbert (git), 2020/11/12
- [PULL 06/11] multifd/tls: fix memoryleak of the QIOChannelSocket object when cancelling migration,
Dr. David Alan Gilbert (git) <=
- [PULL 08/11] virtiofsd: Announce submounts even without statx(), Dr. David Alan Gilbert (git), 2020/11/12
- [PULL 07/11] migration: handle CANCELLING state in migration_completion(), Dr. David Alan Gilbert (git), 2020/11/12
- [PULL 09/11] tools/virtiofsd/buffer.c: check whether buf is NULL in fuse_bufvec_advance func, Dr. David Alan Gilbert (git), 2020/11/12
- [PULL 10/11] virtiofsd: check whether lo_map_reserve returns NULL in, main func, Dr. David Alan Gilbert (git), 2020/11/12
- [PULL 11/11] virtiofsd: check whether strdup lo.source return NULL in main func, Dr. David Alan Gilbert (git), 2020/11/12
- Re: [PULL 00/11] migration queue, Peter Maydell, 2020/11/13