Skip to content
Snippets Groups Projects
Commit 9e842408 authored by Chuan Zheng's avatar Chuan Zheng Committed by Dr. David Alan Gilbert
Browse files

multifd/tls: fix memoryleak of the QIOChannelSocket object when cancelling migration


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: default avatarDaniel P. Berrangé <berrange@redhat.com>
Signed-off-by: default avatarChuan Zheng <zhengchuan@huawei.com>
Message-Id: <1605104763-118687-1-git-send-email-zhengchuan@huawei.com>
Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
parent a18ed79b
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment