From patchwork Mon Jun 4 09:55:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: 858585 jemmy X-Patchwork-Id: 10446169 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 372CF60284 for ; Mon, 4 Jun 2018 09:56:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 27F1A28BC6 for ; Mon, 4 Jun 2018 09:56:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1CB8228BD0; Mon, 4 Jun 2018 09:56:14 +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 C90C528BC6 for ; Mon, 4 Jun 2018 09:56:13 +0000 (UTC) Received: from localhost ([::1]:38608 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPmDh-0007Q6-3o for patchwork-qemu-devel@patchwork.kernel.org; Mon, 04 Jun 2018 05:56:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46287) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPmD0-00073u-Ul for qemu-devel@nongnu.org; Mon, 04 Jun 2018 05:55:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPmCw-0000hL-1E for qemu-devel@nongnu.org; Mon, 04 Jun 2018 05:55:27 -0400 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]:37548) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPmCv-0000h6-QH for qemu-devel@nongnu.org; Mon, 04 Jun 2018 05:55:21 -0400 Received: by mail-pf0-x244.google.com with SMTP id e9-v6so15723149pfi.4 for ; Mon, 04 Jun 2018 02:55:21 -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=Z/BMO5pisreiozqcIVUltQuf59vLgeBACSAe1CnnqAk=; b=dz9H41wL6saexBmQaSUB3y101KoplD+fPPFZYbZ1D2GAy9mWfv0OCOUCp0YirBi9No 8Wf7l0cR1Chip3tIolCAjNUizTzymwePSfhS1F4JncHRZ0dsZHRFEICA3L0FWUf/i3J/ ZLXfSVp2gf0r+apxorVjtKLAvKDZCVRDuNtnLyC+0sq0CgGOYPTy2QMIXsTUExSPuD7r opL2V3rhNYaYu1P2OW6qrnAitNKVTTju+oENODf41gIUzN5nNSy5hzMkc22mhRIQgJhf G5oIjkwKePvKVOP9xK6uIYaP2chWh7uskvlDau2eKkdk9ICLzjwXTyIHVZLpgtVld5iR eyNQ== 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=Z/BMO5pisreiozqcIVUltQuf59vLgeBACSAe1CnnqAk=; b=BEiHh2cXzYmlvsMM64D4mxHcYRCr1ZogkJOR/d84AEFcU41q5wDMgnQ6FiTUKyL4ej iMJ9yQrcj/afPy/7GXqOliZRAj3xy/3MwUE8MoMKcf3X56gCPSpPaM5+IQiuDyxwLwQN q4tSrqrwOdZot4JbSsUeXGR4QUjkUit3XyBf98VdMVZb1Sbw8ZY4zCD05CHv1pPjaQhT sWzfbHWivSIc6KjpzDf5bP0cOrGeqMhY1KqwpF2e2448Ll5l8WeYerCSLEAvK9seVMWX 5ZFsB7XODald7ftXgIt3pGZvuhdrwSUtEh7Vb3d13m4OFhcipAZ6FS52QgHN/0hqX/54 QRbw== X-Gm-Message-State: ALKqPwdeydmbZ8TYdbLxmmk778zYtXYUCYi28q/Qu1Kei8BNHtj4wmyZ d05f0tUJE/l20Su9MN5hjWZU1g== X-Google-Smtp-Source: ADUXVKIiTvtZhb+Q2NTnk0oUX3gX9Bni1KhPtZ7M15QZqRQ2tg7L9BcVxbo4XT12n89iNjg548Lyrg== X-Received: by 2002:a62:d11d:: with SMTP id z29-v6mr20498977pfg.246.1528106120935; Mon, 04 Jun 2018 02:55:20 -0700 (PDT) Received: from VM_93_245_centos.localdomain ([150.109.57.149]) by smtp.gmail.com with ESMTPSA id h84-v6sm44257628pfd.69.2018.06.04.02.55.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Jun 2018 02:55:20 -0700 (PDT) From: Lidong Chen X-Google-Original-From: Lidong Chen To: quintela@redhat.com, dgilbert@redhat.com Date: Mon, 4 Jun 2018 17:55:13 +0800 Message-Id: <1528106113-32692-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:c00::244 Subject: [Qemu-devel] [PATCH] 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 Reviewed-by: Dr. David Alan Gilbert --- migration/migration.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/migration/migration.c b/migration/migration.c index 05aec2c..e009a05 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -156,6 +156,13 @@ 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_array_free(current_incoming->postcopy_remote_fds, true); + g_free(current_incoming); } /* For outgoing */