From nobody Sun Nov 2 11:43:25 2025 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 (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1528106202566102.69294294008614; Mon, 4 Jun 2018 02:56:42 -0700 (PDT) Received: from localhost ([::1]:38608 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPmED-0007Q6-HW for importer@patchew.org; Mon, 04 Jun 2018 05:56:41 -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) 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) 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) 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+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 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); } =20 /* For outgoing */ --=20 1.8.3.1