summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-08-02 15:13:23 +0100
committerPeter Maydell <peter.maydell@linaro.org>2017-08-02 15:13:24 +0100
commitb21c2751b6448414613002cf544eb6a475c4cfe2 (patch)
tree9d55afd7f69959e924a4d4aea37bd1dd35b86308
parentd3d183a638d6a3ead515618a6547b3f80d39fcb9 (diff)
parent8bd9c4e6c565c566a6cba3470cb2d4ea63994143 (diff)
Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20170802a' into staging
Migration pull 2017-08-02 Just minor fixes for 2.10 # gpg: Signature made Wed 02 Aug 2017 14:55:21 BST # gpg: using RSA key 0x0516331EBC5BFDE7 # gpg: Good signature from "Dr. David Alan Gilbert (RH2) <dgilbert@redhat.com>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A 9FA9 0516 331E BC5B FDE7 * remotes/dgilbert/tags/pull-migration-20170802a: io: fix qio_channel_socket_accept err handling migration: fix comment disorder in RAMState migration: fix small leaks Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--io/channel-socket.c3
-rw-r--r--migration/migration.c10
-rw-r--r--migration/ram.c4
3 files changed, 14 insertions, 3 deletions
diff --git a/io/channel-socket.c b/io/channel-socket.c
index 53386b7ba3..591d27e8c3 100644
--- a/io/channel-socket.c
+++ b/io/channel-socket.c
@@ -340,10 +340,11 @@ qio_channel_socket_accept(QIOChannelSocket *ioc,
cioc->fd = qemu_accept(ioc->fd, (struct sockaddr *)&cioc->remoteAddr,
&cioc->remoteAddrLen);
if (cioc->fd < 0) {
- trace_qio_channel_socket_accept_fail(ioc);
if (errno == EINTR) {
goto retry;
}
+ error_setg_errno(errp, errno, "Unable to accept connection");
+ trace_qio_channel_socket_accept_fail(ioc);
goto error;
}
diff --git a/migration/migration.c b/migration/migration.c
index 085c32c994..c3fe0ed9ca 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -2214,6 +2214,15 @@ static void migration_class_init(ObjectClass *klass, void *data)
dc->props = migration_properties;
}
+static void migration_instance_finalize(Object *obj)
+{
+ MigrationState *ms = MIGRATION_OBJ(obj);
+ MigrationParameters *params = &ms->parameters;
+
+ g_free(params->tls_hostname);
+ g_free(params->tls_creds);
+}
+
static void migration_instance_init(Object *obj)
{
MigrationState *ms = MIGRATION_OBJ(obj);
@@ -2282,6 +2291,7 @@ static const TypeInfo migration_type = {
.class_size = sizeof(MigrationClass),
.instance_size = sizeof(MigrationState),
.instance_init = migration_instance_init,
+ .instance_finalize = migration_instance_finalize,
};
static void register_migration_types(void)
diff --git a/migration/ram.c b/migration/ram.c
index 1b08296d1b..e18b3e2d4f 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -188,9 +188,9 @@ struct RAMState {
uint64_t iterations_prev;
/* Iterations since start */
uint64_t iterations;
- /* protects modification of the bitmap */
- uint64_t migration_dirty_pages;
/* number of dirty bits in the bitmap */
+ uint64_t migration_dirty_pages;
+ /* protects modification of the bitmap */
QemuMutex bitmap_mutex;
/* The RAMBlock used in the last src_page_requests */
RAMBlock *last_req_rb;