From patchwork Sat Oct 1 18:56:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 677398 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3smcxr6JFMz9s5w for ; Sun, 2 Oct 2016 05:57:36 +1100 (AEDT) Received: from localhost ([::1]:56867 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqPTZ-0007SF-PF for incoming@patchwork.ozlabs.org; Sat, 01 Oct 2016 14:57:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57117) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqPSM-0006DQ-1D for qemu-devel@nongnu.org; Sat, 01 Oct 2016 14:56:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bqPSJ-00080p-GE for qemu-devel@nongnu.org; Sat, 01 Oct 2016 14:56:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48920) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqPSJ-00080f-9Z; Sat, 01 Oct 2016 14:56:15 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AEBFBC05A2A5; Sat, 1 Oct 2016 18:56:14 +0000 (UTC) Received: from thinkpad.redhat.com (ovpn-112-16.ams2.redhat.com [10.36.112.16]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u91Iu5LR001918; Sat, 1 Oct 2016 14:56:11 -0400 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Sat, 1 Oct 2016 20:56:00 +0200 Message-Id: <1475348164-8593-2-git-send-email-lvivier@redhat.com> In-Reply-To: <1475348164-8593-1-git-send-email-lvivier@redhat.com> References: <1475348164-8593-1-git-send-email-lvivier@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Sat, 01 Oct 2016 18:56:14 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 1/5] tests: fix memory leak in virtio-scsi-test 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: Laurent Vivier , dgibson@redhat.com, thuth@redhat.com, qemu-ppc@nongnu.org, Greg Kurz Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" vs is allocated in qvirtio_scsi_pci_init() and never freed. Signed-off-by: Laurent Vivier Reviewed-by: Greg Kurz --- tests/virtio-scsi-test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/virtio-scsi-test.c b/tests/virtio-scsi-test.c index 79088bb..94d75b1 100644 --- a/tests/virtio-scsi-test.c +++ b/tests/virtio-scsi-test.c @@ -64,6 +64,7 @@ static void qvirtio_scsi_pci_free(QVirtIOSCSI *vs) qvirtio_pci_device_disable(container_of(vs->dev, QVirtioPCIDevice, vdev)); g_free(vs->dev); qpci_free_pc(vs->bus); + g_free(vs); } static uint64_t qvirtio_scsi_alloc(QVirtIOSCSI *vs, size_t alloc_size,