From patchwork Wed Feb 8 03:40:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li Qiang X-Patchwork-Id: 9561739 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 8D71360434 for ; Wed, 8 Feb 2017 03:41:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8910928461 for ; Wed, 8 Feb 2017 03:41:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7D85228495; Wed, 8 Feb 2017 03:41:08 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 EB1B128461 for ; Wed, 8 Feb 2017 03:41:07 +0000 (UTC) Received: from localhost ([::1]:57554 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cbJ7x-0007Y8-EW for patchwork-qemu-devel@patchwork.kernel.org; Tue, 07 Feb 2017 22:41:05 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cbJ7j-0007Y1-9i for qemu-devel@nongnu.org; Tue, 07 Feb 2017 22:40:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cbJ7g-0000Q2-6U for qemu-devel@nongnu.org; Tue, 07 Feb 2017 22:40:51 -0500 Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]:33462) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cbJ7g-0000Pu-0L for qemu-devel@nongnu.org; Tue, 07 Feb 2017 22:40:48 -0500 Received: by mail-pg0-x241.google.com with SMTP id 194so13852973pgd.0 for ; Tue, 07 Feb 2017 19:40:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:from:to:cc:subject:date; bh=nehR84zW6J38gA3S36kuSVVcjMT5Jhx9wCk+hGyJiwA=; b=PG54E0zqjmRC8nKfnhXm9QXNMX1bBEnJ7072hIcgJTO1X0HDXD0Ewr10AFKlBm223F sjVyfJPRaG94zwju9bhLZorFyy8Az24DLvimbNnY5MyPURcYKF9k9HO4n9AbRNBnd7jN mj6gs7vPZcnqTr8C4VsJ3G6UCOkk40YQZbEeqCMiqo2hHapnZhoL90+9lhlue2pm0V+U LxzapONtPxSLtGJgB/0XxVipoU6GIM5LY/kG9F5qNLD/lmxqLmIR599WP1a6W8P4bMGF GH4KIckKcxPrhVUE9Te5gY5reGVa4NwOx+7dMxsE+X4Uk9lJ+BZo0Lua1hBH+32cSIFO RXPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:from:to:cc:subject:date; bh=nehR84zW6J38gA3S36kuSVVcjMT5Jhx9wCk+hGyJiwA=; b=czJEU1/bnQd7DKISFwBv1raopEpRZausL0Yikt2Rz03unemUD+n3McxCug9KqfNHle sAnvEdC6XWV1egfO1a9moWqbMZNNXXs8K8QsQrcPrEp/4jmQQN6y96vDYLOCJekgHFQY +IMk/zaEnnB+NGuiZ9ubED/5G3LeYPSirjlv7ruUN2rWoRTa2MKVnJDLeo0OEI1XmTzR pbGNlmMwv6U/DXbWj3ZNdpbswVgKe1ySjyogMZZiYLJJ392qKX2hLIO0gbL+xfBOjFcJ yYo3KGp8uhYiGQUJNwK5lnTGvO+vIyAuHIIY683Wx6jEl8Chr/iqPTUX3ilrxJc/l7P0 R7Ig== X-Gm-Message-State: AIkVDXK2tKBlBJLc2yBwn7A+IjY+6mW68VfgWbsXlzaPk9gpySRUvh8XbMWMNFvyQtZ3nQ== X-Received: by 10.99.126.76 with SMTP id o12mr24396712pgn.84.1486525246939; Tue, 07 Feb 2017 19:40:46 -0800 (PST) Received: from localhost.localdomain.localdomain ([104.192.110.250]) by smtp.gmail.com with ESMTPSA id x81sm14966790pff.69.2017.02.07.19.40.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Feb 2017 19:40:46 -0800 (PST) Message-ID: <589a933e.54c0620a.e6952.a4c6@mx.google.com> X-Google-Original-Message-ID: <1486525232-12985-1-git-send-email-Qiang(liqiang6-s@360.cn)> From: Li Qiang X-Google-Original-From: Li Qiang(liqiang6-s@360.cn) To: jslaby@suse.cz, qemu-devel@nongnu.org, pbonzini@redhat.com Date: Tue, 7 Feb 2017 19:40:32 -0800 X-Mailer: git-send-email 1.8.3.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c05::241 Subject: [Qemu-devel] [PATCH] misc: edu: free dma timer in device unit 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: Li Qiang Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Li Qiang This can avoid a memory leak when hotplug and unplug. Signed-off-by: Li Qiang --- hw/misc/edu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/misc/edu.c b/hw/misc/edu.c index 401039c..7565552 100644 --- a/hw/misc/edu.c +++ b/hw/misc/edu.c @@ -375,6 +375,7 @@ static void pci_edu_uninit(PCIDevice *pdev) qemu_mutex_destroy(&edu->thr_mutex); timer_del(&edu->dma_timer); + timer_free(&edu->dma_timer); } static void edu_obj_uint64(Object *obj, Visitor *v, const char *name,