From patchwork Thu May 28 11:13:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 49056 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A44D6218EC for ; Thu, 28 May 2015 11:16:23 +0000 (UTC) Received: by wgme6 with SMTP id e6sf9319432wgm.3 for ; Thu, 28 May 2015 04:16:23 -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=kGY6CFloxg/yfpq/zVgNEc32MTaLh8iTvCY2Q1gTlXM=; b=beiB8ZZUgd9ICT0ALbCkiEv8xorvVD2nw/5BF4NjJ/G3RE3BXtn1vWECKtjBMh5diX wBiD/4rLpAJGcHAJKKgVvRMKKKsLl8Y1xqAQkjNhf3wRdXLlOx9HpcLeno+TztkJLhO1 WdhwczCeXT9OgSguPqE2Ge/C4TuKq3saWMJd1gzngj5Z/NaT0zk7c0A0C850X2aFmQP2 /Kd7MC5oVYX33EATJuvDhaBOBTeq2JxuwWFCujOnpyMFxH4e81ZZf6t41KupuYRt+mkW FUCowk0imU9c4NusLFPJR9jRNyUd2j11dnzhjVjbYf1s4VA3P3jkWRCZvwduAWPwNV5d 5SqQ== X-Gm-Message-State: ALoCoQkMPXJX+L5QTgqz2b4lXmq/Sqh2/Sux1qPx0zQ/zXaX2mI+ydQWEberl8I9ipBzNsQ+gG0x X-Received: by 10.112.55.104 with SMTP id r8mr2289409lbp.18.1432811782923; Thu, 28 May 2015 04:16:22 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.8.111 with SMTP id q15ls148911laa.28.gmail; Thu, 28 May 2015 04:16:22 -0700 (PDT) X-Received: by 10.112.83.135 with SMTP id q7mr2242467lby.13.1432811782734; Thu, 28 May 2015 04:16:22 -0700 (PDT) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id c1si1668371lac.116.2015.05.28.04.16.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 May 2015 04:16:22 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by laat2 with SMTP id t2so28945819laa.1 for ; Thu, 28 May 2015 04:16:22 -0700 (PDT) X-Received: by 10.112.219.70 with SMTP id pm6mr2164208lbc.41.1432811782504; Thu, 28 May 2015 04:16:22 -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 hn6csp1069839lbb; Thu, 28 May 2015 04:16:21 -0700 (PDT) X-Received: by 10.140.42.161 with SMTP id c30mr2412024qga.94.1432811781277; Thu, 28 May 2015 04:16:21 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id g36si1988054qgd.123.2015.05.28.04.16.20 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 28 May 2015 04:16:21 -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]:57733 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxvnQ-00069D-B5 for patch@linaro.org; Thu, 28 May 2015 07:16:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40433) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxvmT-0005Ct-E6 for qemu-devel@nongnu.org; Thu, 28 May 2015 07:15:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YxvmP-0002PF-Ny for qemu-devel@nongnu.org; Thu, 28 May 2015 07:15:21 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:18611) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxvmG-0001P6-6g; Thu, 28 May 2015 07:15:08 -0400 Received: from 172.24.2.119 (EHLO szxeml432-hub.china.huawei.com) ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CMA87043; Thu, 28 May 2015 19:14:25 +0800 (CST) Received: from HGHY1Z002260041.china.huawei.com (10.177.16.142) by szxeml432-hub.china.huawei.com (10.82.67.209) with Microsoft SMTP Server id 14.3.158.1; Thu, 28 May 2015 19:14:14 +0800 From: Shannon Zhao To: Date: Thu, 28 May 2015 19:13:42 +0800 Message-ID: <1432811625-13392-2-git-send-email-zhaoshenglong@huawei.com> X-Mailer: git-send-email 1.9.0.msysgit.0 In-Reply-To: <1432811625-13392-1-git-send-email-zhaoshenglong@huawei.com> References: <1432811625-13392-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, pbonzini@redhat.com, mjt@tls.msk.ru, shannon.zhao@linaro.org Subject: [Qemu-devel] [PATCH 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.44 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/display/cg3.c b/hw/display/cg3.c index 1e6ff2b..b86e5c0 100644 --- a/hw/display/cg3.c +++ b/hw/display/cg3.c @@ -302,6 +302,7 @@ static void cg3_realizefn(DeviceState *dev, Error **errp) if (fcode_filename) { ret = load_image_targphys(fcode_filename, s->prom_addr, FCODE_MAX_ROM_SIZE); + g_free(fcode_filename); if (ret < 0 || ret > FCODE_MAX_ROM_SIZE) { error_report("cg3: could not load prom '%s'", CG3_ROM_FILE); }