From nobody Mon Apr 29 05:48:16 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; dkim=fail; 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; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 153190184105246.5343456800307; Wed, 18 Jul 2018 01:17:21 -0700 (PDT) Received: from localhost ([::1]:35319 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffhdz-0004IU-5i for importer@patchew.org; Wed, 18 Jul 2018 04:17:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33707) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffhcz-0003yt-JW for qemu-devel@nongnu.org; Wed, 18 Jul 2018 04:16:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ffhcs-0001of-BV for qemu-devel@nongnu.org; Wed, 18 Jul 2018 04:16:03 -0400 Received: from mail-pl0-x22e.google.com ([2607:f8b0:400e:c01::22e]:45357) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ffhcs-0001nm-4Y for qemu-devel@nongnu.org; Wed, 18 Jul 2018 04:15:58 -0400 Received: by mail-pl0-x22e.google.com with SMTP id 94-v6so1709437ple.12 for ; Wed, 18 Jul 2018 01:15:58 -0700 (PDT) Received: from VM_120_46_centos.localdomain ([119.28.87.64]) by smtp.gmail.com with ESMTPSA id k64-v6sm4196598pgd.47.2018.07.18.01.15.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Jul 2018 01:15:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=sqjNqcWGJvb7pnr9IGuoztN2eySkjM19z39UWATFgb0=; b=grMO0h8PrrsoAV3DVQ2FNRBBMxNMXSo49Rv6O0biuWD1k1pPQX5LpUqd6qA25BTRCP NRaOLv49lyY4oqw/fmKAxn9A2evn+JZyMqeM64Xp4m1fh68qPtsvHdz44DuvKyIX+fGi aof4fkpzvl5ttS83ibTzvngbIavYeITt8WWi0y7jYbr1aLuSqCvLPPVqyr39yniApo6V Ec4TuOBTNqecmjkfNi+J1bHUhc6a0rXetdCRk23doSwUKXCI0OdpITmGODbFH9sADqip 6rw4XzFpwifEaxLCwbOvmv0RinUPe2BKOvc+Dcfl4dNOa6NG+/lYj0r9+oEsR/N3qbXX lZ6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=sqjNqcWGJvb7pnr9IGuoztN2eySkjM19z39UWATFgb0=; b=IidboM6wExr5x1vyNW8/i2ktsd3AAo06yiQ6m6sy9fj1s+7lIlei7rXaRj66RYdZ/e bCdW4FvBcqwChxBFM1U9hFEnbbMkx+5SuTyyWASrLYpz6YmfjtBitNfQOWsi/qiIQk+5 eZDnrZ1AQKokB3VlfcOsngb4hF89p4Uh6s+4evHl+mjb2ui5aCG0+S6AJT5HEVIpuBeK 6J56ETIQNe/uETJgA9/is8pb6baxitB1FKm9cKfRGdHei8smRQvLoZQcNL3zj6S2iIKu JZIFQfw6UQVuvGgL22SFtAef9Z+DDvzCPq+HSXXbAsP66gsETlgagQU3KzJX9GHXP6OP O3Jg== X-Gm-Message-State: AOUpUlEPztl7rsHTBOfOpW9RIYIIzSlL7HTjH9FXkrB6t+LIU7J4u5ZM CjHGXaWgqO8E0LOBHwHjLwo= X-Google-Smtp-Source: AAOMgpcjThMFGpISwSD6SpZ0lahAadvDy7Z9X9xZ2kAxXtUEKf4x3KuyeE0ZaMo+bhIQcynSJbruOQ== X-Received: by 2002:a17:902:8ecb:: with SMTP id x11-v6mr5075710plo.308.1531901757387; Wed, 18 Jul 2018 01:15:57 -0700 (PDT) From: Lidong Chen X-Google-Original-From: Lidong Chen To: quintela@redhat.com, dgilbert@redhat.com Date: Wed, 18 Jul 2018 16:15:41 +0800 Message-Id: <1531901741-8382-1-git-send-email-lidongchen@tencent.com> X-Mailer: git-send-email 1.8.3.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c01::22e Subject: [Qemu-devel] [PATCH v2] migration: release MigrationIncomingState in migration_object_finalize 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: qemu-devel@nongnu.org, Lidong Chen Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Qemu initialize the MigrationIncomingState structure in migration_object_in= it, but not release it. this patch release it in migration_object_finalize. Signed-off-by: Lidong Chen --- migration/migration.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/migration/migration.c b/migration/migration.c index 8d56d56930..37048d9dad 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -161,6 +161,12 @@ void migration_object_init(void) void migration_object_finalize(void) { object_unref(OBJECT(current_migration)); + + qemu_sem_destroy(¤t_incoming->postcopy_pause_sem_fault); + qemu_sem_destroy(¤t_incoming->postcopy_pause_sem_dst); + qemu_event_destroy(¤t_incoming->main_thread_load_event); + qemu_mutex_destroy(¤t_incoming->rp_mutex); + g_free(current_incoming); } =20 /* For outgoing */ --=20 2.15.2 (Apple Git-101.1)