From patchwork Wed Jul 18 08:15:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: 858585 jemmy X-Patchwork-Id: 10531599 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1E75E600F4 for ; Wed, 18 Jul 2018 08:16:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C46728F76 for ; Wed, 18 Jul 2018 08:16:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F04D428F7F; Wed, 18 Jul 2018 08:16:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5DAE228F76 for ; Wed, 18 Jul 2018 08:16:53 +0000 (UTC) Received: from localhost ([::1]:35318 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffhdk-0003zb-8U for patchwork-qemu-devel@patchwork.kernel.org; Wed, 18 Jul 2018 04:16:52 -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) 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) 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) 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Qemu initialize the MigrationIncomingState structure in migration_object_init, 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); } /* For outgoing */