From patchwork Thu May 28 12:39:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 49098 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E5FD2218EC for ; Thu, 28 May 2015 12:45:36 +0000 (UTC) Received: by lagv1 with SMTP id v1sf10811454lag.1 for ; Thu, 28 May 2015 05:45:36 -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=0dY37hAHQLJWDx0maj02iTt6BIT33BWGZY5L4EerG8s=; b=bq0GM+q0fdtGsEFz1y+DQNzdJ5v/0ehf3GKmd4C6Xy+ybXsk4A5t5ZMYFFVdd122gl vkLhRV6nLf/vsuR7kFL5amF3u0KyqzhM5Vc5/LDts64+TVOtGiSnk83BcOuhv3Vl7Bz/ u/1xdu/meoTstSEjiDRpaQ9/oQrJIOcPGjD7OzLqqhRqZXkj8tJwVC3MQ5JHYLW232T3 xALQK7OrQqCMMH49hPXOW1tzKptt9Q/yh5pd06E7ftRVwSOyaOc1Lld9RRmoU/PejMyi qy9RrgpsxtZIDkxdnwPjssq2rLmYlcEeS24wvJAstlmKwrbZF9F48mRDzaFQtwYPbhDN 9+Hw== X-Gm-Message-State: ALoCoQkDaq9pMNXOK0r+t7IsDGKym1eUj4esgy/wz0g1kKuY2iKuOYiIj6KZPGXpf0zdsuLT36HL X-Received: by 10.152.2.169 with SMTP id 9mr2549762lav.1.1432817135987; Thu, 28 May 2015 05:45:35 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.116.7 with SMTP id js7ls171650lab.34.gmail; Thu, 28 May 2015 05:45:35 -0700 (PDT) X-Received: by 10.112.13.98 with SMTP id g2mr2673038lbc.102.1432817135863; Thu, 28 May 2015 05:45:35 -0700 (PDT) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com. [209.85.215.46]) by mx.google.com with ESMTPS id x5si1851631laj.129.2015.05.28.05.45.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 May 2015 05:45:35 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by labko7 with SMTP id ko7so27086590lab.2 for ; Thu, 28 May 2015 05:45:35 -0700 (PDT) X-Received: by 10.112.222.133 with SMTP id qm5mr2629744lbc.86.1432817135457; Thu, 28 May 2015 05:45:35 -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 hn6csp1129591lbb; Thu, 28 May 2015 05:45:34 -0700 (PDT) X-Received: by 10.55.41.211 with SMTP id p80mr4700956qkp.32.1432817134139; Thu, 28 May 2015 05:45:34 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id i64si2216837qge.99.2015.05.28.05.45.33 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 28 May 2015 05:45:34 -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]:58745 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxxBl-000826-9w for patch@linaro.org; Thu, 28 May 2015 08:45:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41016) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yxx6u-0007lS-VD for qemu-devel@nongnu.org; Thu, 28 May 2015 08:40:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yxx6l-0007uD-5r for qemu-devel@nongnu.org; Thu, 28 May 2015 08:40:32 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:49412) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yxx6k-0007jz-IF; Thu, 28 May 2015 08:40:23 -0400 Received: from 172.24.2.119 (EHLO szxeml426-hub.china.huawei.com) ([172.24.2.119]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id BGR96154; Thu, 28 May 2015 20:40:04 +0800 (CST) Received: from HGHY1Z002260041.china.huawei.com (10.177.16.142) by szxeml426-hub.china.huawei.com (10.82.67.181) with Microsoft SMTP Server id 14.3.158.1; Thu, 28 May 2015 20:39:56 +0800 From: Shannon Zhao To: Date: Thu, 28 May 2015 20:39:41 +0800 Message-ID: <1432816784-12436-2-git-send-email-zhaoshenglong@huawei.com> X-Mailer: git-send-email 1.9.0.msysgit.0 In-Reply-To: <1432816784-12436-1-git-send-email-zhaoshenglong@huawei.com> References: <1432816784-12436-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.0A020204.55670CA4.02B2, 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: 647bb6553a292016f77b692714681695 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, pbonzini@redhat.com, mjt@tls.msk.ru, shannon.zhao@linaro.org, peter.maydell@linaro.org Subject: [Qemu-devel] [PATCH v2 1/4] hw/display/cg3.c: Fix memory leak 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.46 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 Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/display/cg3.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/display/cg3.c b/hw/display/cg3.c index 1e6ff2b..186d544 100644 --- a/hw/display/cg3.c +++ b/hw/display/cg3.c @@ -303,8 +303,9 @@ static void cg3_realizefn(DeviceState *dev, Error **errp) ret = load_image_targphys(fcode_filename, s->prom_addr, FCODE_MAX_ROM_SIZE); if (ret < 0 || ret > FCODE_MAX_ROM_SIZE) { - error_report("cg3: could not load prom '%s'", CG3_ROM_FILE); + error_report("cg3: could not load prom '%s'", fcode_filename); } + g_free(fcode_filename); } memory_region_init_ram(&s->vram_mem, NULL, "cg3.vram", s->vram_size,