From nobody Mon Apr 29 13:01:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1512152890786747.6256989476519; Fri, 1 Dec 2017 10:28:10 -0800 (PST) Received: from localhost ([::1]:59480 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eKq2d-0006VK-0l for importer@patchew.org; Fri, 01 Dec 2017 13:28:03 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53918) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eKoIV-0004LF-VH for qemu-devel@nongnu.org; Fri, 01 Dec 2017 11:36:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eKoIQ-0002Y1-4S for qemu-devel@nongnu.org; Fri, 01 Dec 2017 11:36:19 -0500 Received: from mx1.redhat.com ([209.132.183.28]:32402) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eKoIP-0002X3-RB for qemu-devel@nongnu.org; Fri, 01 Dec 2017 11:36:14 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B004180B22 for ; Fri, 1 Dec 2017 12:57:34 +0000 (UTC) Received: from secure.mitica (ovpn-117-171.ams2.redhat.com [10.36.117.171]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3EFC8600D4; Fri, 1 Dec 2017 12:57:33 +0000 (UTC) From: Juan Quintela To: qemu-devel@nongnu.org Date: Fri, 1 Dec 2017 13:57:26 +0100 Message-Id: <20171201125728.1310-2-quintela@redhat.com> In-Reply-To: <20171201125728.1310-1-quintela@redhat.com> References: <20171201125728.1310-1-quintela@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 01 Dec 2017 12:57:34 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 1/3] migration: Use proper types in json X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, dgilbert@redhat.com, peterx@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" We use int for everything (int64_t), and then we check that value is between 0 and 255. Change it to the valid types. This change only happens for HMP. QMP always use bytes and similar. Signed-off-by: Juan Quintela Reviewed-by: Eric Blake --- hmp.c | 22 +++++++++++----------- migration/migration.c | 49 ++++++++++++++++++++---------------------------= -- qapi/migration.json | 20 ++++++++++---------- 3 files changed, 41 insertions(+), 50 deletions(-) diff --git a/hmp.c b/hmp.c index 35a7041824..1727c9c003 100644 --- a/hmp.c +++ b/hmp.c @@ -293,23 +293,23 @@ void hmp_info_migrate_parameters(Monitor *mon, const = QDict *qdict) =20 if (params) { assert(params->has_compress_level); - monitor_printf(mon, "%s: %" PRId64 "\n", + monitor_printf(mon, "%s: %u\n", MigrationParameter_str(MIGRATION_PARAMETER_COMPRESS_LEVEL), params->compress_level); assert(params->has_compress_threads); - monitor_printf(mon, "%s: %" PRId64 "\n", + monitor_printf(mon, "%s: %u\n", MigrationParameter_str(MIGRATION_PARAMETER_COMPRESS_THREADS), params->compress_threads); assert(params->has_decompress_threads); - monitor_printf(mon, "%s: %" PRId64 "\n", + monitor_printf(mon, "%s: %u\n", MigrationParameter_str(MIGRATION_PARAMETER_DECOMPRESS_THREADS), params->decompress_threads); assert(params->has_cpu_throttle_initial); - monitor_printf(mon, "%s: %" PRId64 "\n", + monitor_printf(mon, "%s: %u\n", MigrationParameter_str(MIGRATION_PARAMETER_CPU_THROTTLE_INITIA= L), params->cpu_throttle_initial); assert(params->has_cpu_throttle_increment); - monitor_printf(mon, "%s: %" PRId64 "\n", + monitor_printf(mon, "%s: %u\n", MigrationParameter_str(MIGRATION_PARAMETER_CPU_THROTTLE_INCREM= ENT), params->cpu_throttle_increment); assert(params->has_tls_creds); @@ -321,28 +321,28 @@ void hmp_info_migrate_parameters(Monitor *mon, const = QDict *qdict) MigrationParameter_str(MIGRATION_PARAMETER_TLS_HOSTNAME), params->tls_hostname); assert(params->has_max_bandwidth); - monitor_printf(mon, "%s: %" PRId64 " bytes/second\n", + monitor_printf(mon, "%s: %" PRIu64 " bytes/second\n", MigrationParameter_str(MIGRATION_PARAMETER_MAX_BANDWIDTH), params->max_bandwidth); assert(params->has_downtime_limit); - monitor_printf(mon, "%s: %" PRId64 " milliseconds\n", + monitor_printf(mon, "%s: %" PRIu64 " milliseconds\n", MigrationParameter_str(MIGRATION_PARAMETER_DOWNTIME_LIMIT), params->downtime_limit); assert(params->has_x_checkpoint_delay); - monitor_printf(mon, "%s: %" PRId64 "\n", + monitor_printf(mon, "%s: %u\n", MigrationParameter_str(MIGRATION_PARAMETER_X_CHECKPOINT_DELAY), params->x_checkpoint_delay); assert(params->has_block_incremental); monitor_printf(mon, "%s: %s\n", MigrationParameter_str(MIGRATION_PARAMETER_BLOCK_INCREMENTAL), params->block_incremental ? "on" : "off"); - monitor_printf(mon, "%s: %" PRId64 "\n", + monitor_printf(mon, "%s: %u\n", MigrationParameter_str(MIGRATION_PARAMETER_X_MULTIFD_CHANNELS), params->x_multifd_channels); - monitor_printf(mon, "%s: %" PRId64 "\n", + monitor_printf(mon, "%s: %u\n", MigrationParameter_str(MIGRATION_PARAMETER_X_MULTIFD_PAGE_COUN= T), params->x_multifd_page_count); - monitor_printf(mon, "%s: %" PRId64 "\n", + monitor_printf(mon, "%s: %" PRIu64 "\n", MigrationParameter_str(MIGRATION_PARAMETER_XBZRLE_CACHE_SIZE), params->xbzrle_cache_size); } diff --git a/migration/migration.c b/migration/migration.c index 4de3b551fe..8d2372394c 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -741,22 +741,20 @@ void qmp_migrate_set_capabilities(MigrationCapability= StatusList *params, static bool migrate_params_check(MigrationParameters *params, Error **errp) { if (params->has_compress_level && - (params->compress_level < 0 || params->compress_level > 9)) { + (params->compress_level > 9)) { error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "compress_level", "is invalid, it should be in the range of 0 to 9"); return false; } =20 - if (params->has_compress_threads && - (params->compress_threads < 1 || params->compress_threads > 255)) { + if (params->has_compress_threads && (params->compress_threads < 1)) { error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "compress_threads", "is invalid, it should be in the range of 1 to 255"); return false; } =20 - if (params->has_decompress_threads && - (params->decompress_threads < 1 || params->decompress_threads > 25= 5)) { + if (params->has_decompress_threads && (params->decompress_threads < 1)= ) { error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "decompress_threads", "is invalid, it should be in the range of 1 to 255"); @@ -781,38 +779,31 @@ static bool migrate_params_check(MigrationParameters = *params, Error **errp) return false; } =20 - if (params->has_max_bandwidth && - (params->max_bandwidth < 0 || params->max_bandwidth > SIZE_MAX)) { + if (params->has_max_bandwidth && (params->max_bandwidth > SIZE_MAX)) { error_setg(errp, "Parameter 'max_bandwidth' expects an integer in = the" " range of 0 to %zu bytes/second", SIZE_MAX); return false; } =20 if (params->has_downtime_limit && - (params->downtime_limit < 0 || - params->downtime_limit > MAX_MIGRATE_DOWNTIME)) { + (params->downtime_limit > MAX_MIGRATE_DOWNTIME)) { error_setg(errp, "Parameter 'downtime_limit' expects an integer in= " "the range of 0 to %d milliseconds", MAX_MIGRATE_DOWNTIME); return false; } =20 - if (params->has_x_checkpoint_delay && (params->x_checkpoint_delay < 0)= ) { - error_setg(errp, QERR_INVALID_PARAMETER_VALUE, - "x_checkpoint_delay", - "is invalid, it should be positive"); - return false; - } - if (params->has_x_multifd_channels && - (params->x_multifd_channels < 1 || params->x_multifd_channels > 25= 5)) { + /* x_checkpoint_delay is now always positive */ + + if (params->has_x_multifd_channels && (params->x_multifd_channels < 1)= ) { error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "multifd_channels", "is invalid, it should be in the range of 1 to 255"); return false; } if (params->has_x_multifd_page_count && - (params->x_multifd_page_count < 1 || - params->x_multifd_page_count > 10000)) { + (params->x_multifd_page_count < 1 || + params->x_multifd_page_count > 10000)) { error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "multifd_page_count", "is invalid, it should be in the range of 1 to 10000"); @@ -2394,33 +2385,33 @@ static Property migration_properties[] =3D { send_section_footer, true), =20 /* Migration parameters */ - DEFINE_PROP_INT64("x-compress-level", MigrationState, + DEFINE_PROP_UINT8("x-compress-level", MigrationState, parameters.compress_level, DEFAULT_MIGRATE_COMPRESS_LEVEL), - DEFINE_PROP_INT64("x-compress-threads", MigrationState, + DEFINE_PROP_UINT8("x-compress-threads", MigrationState, parameters.compress_threads, DEFAULT_MIGRATE_COMPRESS_THREAD_COUNT), - DEFINE_PROP_INT64("x-decompress-threads", MigrationState, + DEFINE_PROP_UINT8("x-decompress-threads", MigrationState, parameters.decompress_threads, DEFAULT_MIGRATE_DECOMPRESS_THREAD_COUNT), - DEFINE_PROP_INT64("x-cpu-throttle-initial", MigrationState, + DEFINE_PROP_UINT8("x-cpu-throttle-initial", MigrationState, parameters.cpu_throttle_initial, DEFAULT_MIGRATE_CPU_THROTTLE_INITIAL), - DEFINE_PROP_INT64("x-cpu-throttle-increment", MigrationState, + DEFINE_PROP_UINT8("x-cpu-throttle-increment", MigrationState, parameters.cpu_throttle_increment, DEFAULT_MIGRATE_CPU_THROTTLE_INCREMENT), - DEFINE_PROP_INT64("x-max-bandwidth", MigrationState, + DEFINE_PROP_SIZE("x-max-bandwidth", MigrationState, parameters.max_bandwidth, MAX_THROTTLE), - DEFINE_PROP_INT64("x-downtime-limit", MigrationState, + DEFINE_PROP_UINT64("x-downtime-limit", MigrationState, parameters.downtime_limit, DEFAULT_MIGRATE_SET_DOWNTIME), - DEFINE_PROP_INT64("x-checkpoint-delay", MigrationState, + DEFINE_PROP_UINT32("x-checkpoint-delay", MigrationState, parameters.x_checkpoint_delay, DEFAULT_MIGRATE_X_CHECKPOINT_DELAY), - DEFINE_PROP_INT64("x-multifd-channels", MigrationState, + DEFINE_PROP_UINT8("x-multifd-channels", MigrationState, parameters.x_multifd_channels, DEFAULT_MIGRATE_MULTIFD_CHANNELS), - DEFINE_PROP_INT64("x-multifd-page-count", MigrationState, + DEFINE_PROP_UINT32("x-multifd-page-count", MigrationState, parameters.x_multifd_page_count, DEFAULT_MIGRATE_MULTIFD_PAGE_COUNT), DEFINE_PROP_SIZE("xbzrle-cache-size", MigrationState, diff --git a/qapi/migration.json b/qapi/migration.json index 03f57c9616..4cd3d13158 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -668,19 +668,19 @@ # Since: 2.4 ## { 'struct': 'MigrationParameters', - 'data': { '*compress-level': 'int', - '*compress-threads': 'int', - '*decompress-threads': 'int', - '*cpu-throttle-initial': 'int', - '*cpu-throttle-increment': 'int', + 'data': { '*compress-level': 'uint8', + '*compress-threads': 'uint8', + '*decompress-threads': 'uint8', + '*cpu-throttle-initial': 'uint8', + '*cpu-throttle-increment': 'uint8', '*tls-creds': 'str', '*tls-hostname': 'str', - '*max-bandwidth': 'int', - '*downtime-limit': 'int', - '*x-checkpoint-delay': 'int', + '*max-bandwidth': 'size', + '*downtime-limit': 'uint64', + '*x-checkpoint-delay': 'uint32', '*block-incremental': 'bool' , - '*x-multifd-channels': 'int', - '*x-multifd-page-count': 'int', + '*x-multifd-channels': 'uint8', + '*x-multifd-page-count': 'uint32', '*xbzrle-cache-size': 'size' } } =20 ## --=20 2.14.3 From nobody Mon Apr 29 13:01:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1512153252344224.36914567249937; Fri, 1 Dec 2017 10:34:12 -0800 (PST) Received: from localhost ([::1]:59531 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eKq8U-0004Dr-Ir for importer@patchew.org; Fri, 01 Dec 2017 13:34:06 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54276) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eKoIp-0004dh-Bu for qemu-devel@nongnu.org; Fri, 01 Dec 2017 11:36:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eKoIo-0002rn-2L for qemu-devel@nongnu.org; Fri, 01 Dec 2017 11:36:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38982) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eKoIn-0002r4-Se for qemu-devel@nongnu.org; Fri, 01 Dec 2017 11:36:37 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 62F4061D0E for ; Fri, 1 Dec 2017 12:57:36 +0000 (UTC) Received: from secure.mitica (ovpn-117-171.ams2.redhat.com [10.36.117.171]) by smtp.corp.redhat.com (Postfix) with ESMTP id 10B63600D4; Fri, 1 Dec 2017 12:57:34 +0000 (UTC) From: Juan Quintela To: qemu-devel@nongnu.org Date: Fri, 1 Dec 2017 13:57:27 +0100 Message-Id: <20171201125728.1310-3-quintela@redhat.com> In-Reply-To: <20171201125728.1310-1-quintela@redhat.com> References: <20171201125728.1310-1-quintela@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 01 Dec 2017 12:57:36 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 2/3] migration: print features as on off X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, dgilbert@redhat.com, peterx@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Once there, do one thing for line Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu --- migration/migration.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index 8d2372394c..19917a4b5b 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -2366,10 +2366,15 @@ void migration_global_dump(Monitor *mon) { MigrationState *ms =3D migrate_get_current(); =20 - monitor_printf(mon, "globals: store-global-state=3D%d, only_migratable= =3D%d, " - "send-configuration=3D%d, send-section-footer=3D%d\n", - ms->store_global_state, ms->only_migratable, - ms->send_configuration, ms->send_section_footer); + monitor_printf(mon, "globals:\n"); + monitor_printf(mon, "store-global-state: %s\n", + ms->store_global_state ? "on" : "off"); + monitor_printf(mon, "only-migratable: %s\n", + ms->only_migratable ? "on" : "off"); + monitor_printf(mon, "send-configuration: %s\n", + ms->send_configuration ? "on" : "off"); + monitor_printf(mon, "send-section-footer: %s\n", + ms->send_section_footer ? "on" : "off"); } =20 #define DEFINE_PROP_MIG_CAP(name, x) \ --=20 2.14.3 From nobody Mon Apr 29 13:01:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1512153071546177.40624947519734; Fri, 1 Dec 2017 10:31:11 -0800 (PST) Received: from localhost ([::1]:59517 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eKq5S-00017R-Dd for importer@patchew.org; Fri, 01 Dec 2017 13:30:58 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54265) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eKoIp-0004dM-1M for qemu-devel@nongnu.org; Fri, 01 Dec 2017 11:36:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eKoIj-0002oO-W0 for qemu-devel@nongnu.org; Fri, 01 Dec 2017 11:36:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51446) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eKoIj-0002no-Pw for qemu-devel@nongnu.org; Fri, 01 Dec 2017 11:36:33 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2CA334901B for ; Fri, 1 Dec 2017 12:57:38 +0000 (UTC) Received: from secure.mitica (ovpn-117-171.ams2.redhat.com [10.36.117.171]) by smtp.corp.redhat.com (Postfix) with ESMTP id B5AD3600D4; Fri, 1 Dec 2017 12:57:36 +0000 (UTC) From: Juan Quintela To: qemu-devel@nongnu.org Date: Fri, 1 Dec 2017 13:57:28 +0100 Message-Id: <20171201125728.1310-4-quintela@redhat.com> In-Reply-To: <20171201125728.1310-1-quintela@redhat.com> References: <20171201125728.1310-1-quintela@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 01 Dec 2017 12:57:38 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 3/3] migration: free addr in the same function that we created it X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, dgilbert@redhat.com, peterx@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Otherwise, we can't use it after calling socket_start_incoming_migration Signed-off-by: Juan Quintela Reviewed-by: Peter Xu --- migration/socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/migration/socket.c b/migration/socket.c index dee869044a..3a8232dd2d 100644 --- a/migration/socket.c +++ b/migration/socket.c @@ -172,7 +172,6 @@ static void socket_start_incoming_migration(SocketAddre= ss *saddr, =20 if (qio_channel_socket_listen_sync(listen_ioc, saddr, errp) < 0) { object_unref(OBJECT(listen_ioc)); - qapi_free_SocketAddress(saddr); return; } =20 @@ -181,7 +180,6 @@ static void socket_start_incoming_migration(SocketAddre= ss *saddr, socket_accept_incoming_migration, listen_ioc, (GDestroyNotify)object_unref); - qapi_free_SocketAddress(saddr); } =20 void tcp_start_incoming_migration(const char *host_port, Error **errp) @@ -191,6 +189,7 @@ void tcp_start_incoming_migration(const char *host_port= , Error **errp) if (!err) { socket_start_incoming_migration(saddr, &err); } + qapi_free_SocketAddress(saddr); error_propagate(errp, err); } =20 @@ -198,4 +197,5 @@ void unix_start_incoming_migration(const char *path, Er= ror **errp) { SocketAddress *saddr =3D unix_build_address(path); socket_start_incoming_migration(saddr, errp); + qapi_free_SocketAddress(saddr); } --=20 2.14.3