From patchwork Mon May 25 08:37:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 48953 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A60062121F for ; Mon, 25 May 2015 08:41:30 +0000 (UTC) Received: by lbbqq2 with SMTP id qq2sf19790492lbb.0 for ; Mon, 25 May 2015 01:41:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version:content-type:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=BHRUhn8Ozu+s3SazGHZkpZ8MD/VV+zyfu8WP/ikMe8U=; b=Os0PylVAXc3E6ewWWxG2VAZS4gGHAX2BrkHinqFovwGOl5wxMyvrLFKsmlirv3v2dj iaLL4ZgYPzg8aysxaVNfOVrknYnvPlM/PZ3y6nCzkPFHqQV3KrQYYAwZPBgebJLszNrC xga+rvju9QoVe6hdTDTM6rD2n4dFhBxuGL9p19ZntzsKigD+AwKppX8NT6/6hOEpDBTJ 6sX92oI5VbBtdBU8ycaH8XpPoQ3rACN7saVX2zm4Z++NGFEOfwX0GUtnbOoKaG04nILD JUTNUoGtEvV7okdge3xLtULafrgODN/6IMTVTzYh0/eI0vpnpbfWL1BdGzkqwMW4x+Qp Xicg== X-Gm-Message-State: ALoCoQnpd2mYkPoUx1sMKcLdHSHRF8kewUYXiHXXjXx+m5evC0CS43sWwNZSnrn0mkZECHeH+Em2 X-Received: by 10.112.142.170 with SMTP id rx10mr21275498lbb.12.1432543281384; Mon, 25 May 2015 01:41:21 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.43.133 with SMTP id w5ls32414lal.32.gmail; Mon, 25 May 2015 01:41:21 -0700 (PDT) X-Received: by 10.152.5.198 with SMTP id u6mr17116218lau.48.1432543281265; Mon, 25 May 2015 01:41:21 -0700 (PDT) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com. [209.85.215.49]) by mx.google.com with ESMTPS id wv10si7915522lac.79.2015.05.25.01.41.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 May 2015 01:41:21 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) client-ip=209.85.215.49; Received: by labbd9 with SMTP id bd9so45458258lab.2 for ; Mon, 25 May 2015 01:41:21 -0700 (PDT) X-Received: by 10.152.21.136 with SMTP id v8mr17407024lae.19.1432543281127; Mon, 25 May 2015 01:41:21 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp1693901lbb; Mon, 25 May 2015 01:41:20 -0700 (PDT) X-Received: by 10.140.151.197 with SMTP id 188mr27683478qhx.18.1432543279790; Mon, 25 May 2015 01:41:19 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id d69si7643825qhc.129.2015.05.25.01.41.19 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 25 May 2015 01:41:19 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:42492 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ywnwk-0003MS-UZ for patch@linaro.org; Mon, 25 May 2015 04:41:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38132) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ywnvo-0002PZ-6v for qemu-devel@nongnu.org; Mon, 25 May 2015 04:40:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ywnvk-0001Hn-AS for qemu-devel@nongnu.org; Mon, 25 May 2015 04:40:20 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:22080) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ywnvb-0000uK-0q; Mon, 25 May 2015 04:40:07 -0400 Received: from 172.24.2.119 (EHLO szxeml427-hub.china.huawei.com) ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CLV99028; Mon, 25 May 2015 16:39:58 +0800 (CST) Received: from HGHY1Z002260041.china.huawei.com (10.177.16.142) by szxeml427-hub.china.huawei.com (10.82.67.182) with Microsoft SMTP Server id 14.3.158.1; Mon, 25 May 2015 16:38:10 +0800 From: Shannon Zhao To: Date: Mon, 25 May 2015 16:37:57 +0800 Message-ID: <1432543077-12656-4-git-send-email-zhaoshenglong@huawei.com> X-Mailer: git-send-email 1.9.0.msysgit.0 In-Reply-To: <1432543077-12656-1-git-send-email-zhaoshenglong@huawei.com> References: <1432543077-12656-1-git-send-email-zhaoshenglong@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.16.142] X-CFilter-Loop: Reflected X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 119.145.14.65 Cc: qemu-trivial@nongnu.org, shannon.zhao@linaro.org Subject: [Qemu-devel] [PATCH 3/3] hw/i386/acpi-build: decref after use X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Shannon Zhao valgrind complains about: ==16447== 48 bytes in 2 blocks are definitely lost in loss record 2,033 of 3,310 ==16447== at 0x4C2845D: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==16447== by 0x2E4FD7: malloc_and_trace (vl.c:2546) ==16447== by 0x64C770E: g_malloc (in /usr/lib64/libglib-2.0.so.0.3600.3) ==16447== by 0x53EC3F: qint_from_int (qint.c:33) ==16447== by 0x53B426: qmp_output_type_int (qmp-output-visitor.c:162) ==16447== by 0x539257: visit_type_uint32 (qapi-visit-core.c:147) ==16447== by 0x471D07: property_get_uint32_ptr (object.c:1651) ==16447== by 0x47000C: object_property_get (object.c:822) ==16447== by 0x472428: object_property_get_qobject (qom-qobject.c:37) ==16447== by 0x25701A: build_append_pci_bus_devices (acpi-build.c:520) ==16447== by 0x25902E: build_ssdt (acpi-build.c:1004) ==16447== by 0x25A0A8: acpi_build (acpi-build.c:1420) Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/i386/acpi-build.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index d0a5c85..1b566c9 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -648,6 +648,7 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus, } } aml_append(parent_scope, method); + qobject_decref(bsel); } static void