From patchwork Tue May 26 01:46:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 48970 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7CD3C2121F for ; Tue, 26 May 2015 01:51:56 +0000 (UTC) Received: by wifx6 with SMTP id x6sf6791432wif.1 for ; Mon, 25 May 2015 18:51:55 -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=sUFQJM/UeZhjSX85qnFUSmU0sPxld0lwwRfVV+kxQi4=; b=Jp50WpBH4/LSHnTgQPGc7n778fnHGBYJ2idfsbnUewh+YaUtvGSm908MZ+/06vhmXK 2xeP5hDGQReGJXIdDSFTUtkUkFDarQejovksYdDuhH3WLaUN1OXkhn0nYQoVGbJ3oE5p YKm/C8qnvS96r9ernCBYz7fvVcSfdM0rb54za9hpNvd0Ueun7nNIw9WvnLVg/Lu6Pg+a gaBt71qaQaIfCnI9PFAhBB77aJVitR7EAm3b+mvDG3BuTznh2eenDScFEta3lJ9UoK0X 9V4tLGJ8Hy+n7q3C/cpYcBrp4cI8RQ2AiHDBLdTgCtVyElvNrYjwtva9zJ8UPfoxqpku Q3mg== X-Gm-Message-State: ALoCoQki7sNOG0UjVy2nY73MipC187bzAhVlDMB4JTgzCIrl7eteYxnGtwYfvCFzogErrTl08ENZ X-Received: by 10.180.90.106 with SMTP id bv10mr15495778wib.6.1432605115852; Mon, 25 May 2015 18:51:55 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.245.43 with SMTP id xl11ls830089lac.21.gmail; Mon, 25 May 2015 18:51:55 -0700 (PDT) X-Received: by 10.112.170.167 with SMTP id an7mr10340571lbc.103.1432605115715; Mon, 25 May 2015 18:51:55 -0700 (PDT) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com. [209.85.217.170]) by mx.google.com with ESMTPS id bc7si9693214lbc.144.2015.05.25.18.51.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 May 2015 18:51:55 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) client-ip=209.85.217.170; Received: by lbbzk7 with SMTP id zk7so60472636lbb.0 for ; Mon, 25 May 2015 18:51:55 -0700 (PDT) X-Received: by 10.112.163.168 with SMTP id yj8mr20427322lbb.36.1432605115582; Mon, 25 May 2015 18:51:55 -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 hn6csp2191643lbb; Mon, 25 May 2015 18:51:54 -0700 (PDT) X-Received: by 10.55.40.89 with SMTP id o86mr30855437qkh.6.1432605114290; Mon, 25 May 2015 18:51:54 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 78si12443207qhf.50.2015.05.25.18.51.53 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 25 May 2015 18:51:54 -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]:45497 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yx425-0004hM-De for patch@linaro.org; Mon, 25 May 2015 21:51:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yx406-0001Lo-Li for qemu-devel@nongnu.org; Mon, 25 May 2015 21:49:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yx405-00035c-SW for qemu-devel@nongnu.org; Mon, 25 May 2015 21:49:50 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:24351) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yx3zz-00033U-Ru; Mon, 25 May 2015 21:49:44 -0400 Received: from 172.24.2.119 (EHLO szxeml427-hub.china.huawei.com) ([172.24.2.119]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id BGN88725; Tue, 26 May 2015 09:46:27 +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; Tue, 26 May 2015 09:46:20 +0800 From: Shannon Zhao To: Date: Tue, 26 May 2015 09:46:07 +0800 Message-ID: <1432604767-5964-4-git-send-email-zhaoshenglong@huawei.com> X-Mailer: git-send-email 1.9.0.msysgit.0 In-Reply-To: <1432604767-5964-1-git-send-email-zhaoshenglong@huawei.com> References: <1432604767-5964-1-git-send-email-zhaoshenglong@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.16.142] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020202.5563D073.00D9, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 3f1a16e41715a43027f2f88f0d8f3f1e X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 119.145.14.66 Cc: qemu-trivial@nongnu.org, shannon.zhao@linaro.org Subject: [Qemu-devel] [PATCH v2 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.217.170 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 Reviewed-by: Igor Mammedov --- 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