From patchwork Wed Jun 3 13:08:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 49474 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CD4B020BE7 for ; Wed, 3 Jun 2015 14:29:46 +0000 (UTC) Received: by lbbqq2 with SMTP id qq2sf3229813lbb.0 for ; Wed, 03 Jun 2015 07:29:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references: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=sqwg4Mv6CJoA2vdnvvxxczHZ3/1S2l/R9iI9DUmjbtw=; b=dFWhaZVlnaTifVB9eL78NNID1S0Qz+oSY/guJfnjQyZncym68rDip90NSBcrUSSK+9 5CM2PzgfuiZIvxZuGQJ0C31zgnjDsld3PruUG6XYE1re1Btov+JZCxrDFTBXtNNHfPAE USei09Qp4KwgSjyMWjMVEhSEmBXzQY0uiMwIvUc4K4rACLW2iIS4D00NVtQzmzeYxSuv 0gzz0xsun60LEIgDbmg6dH4rtyFcgow5aEO9S8hQ+RjTMdY2smGCTk8gCmwYHzKlIpos li4cRSdUDfXT7qi8MzCzLjU6x7fviv8L2Pb/EJEHp9vLLeeIRNRDIR11VZ3gSxEtbFfv WixQ== X-Gm-Message-State: ALoCoQkdQXkZXBTbC2v0Sz20/Xe9+PcSnlqnCE65DyDq8OFSyjTVJNhDjdUaBAl0JSs6eXE/gZDu X-Received: by 10.112.29.39 with SMTP id g7mr31084918lbh.1.1433341785790; Wed, 03 Jun 2015 07:29:45 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.115.211 with SMTP id jq19ls68336lab.69.gmail; Wed, 03 Jun 2015 07:29:45 -0700 (PDT) X-Received: by 10.112.155.197 with SMTP id vy5mr31916995lbb.29.1433341785642; Wed, 03 Jun 2015 07:29:45 -0700 (PDT) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com. [209.85.217.181]) by mx.google.com with ESMTPS id o5si18147744lao.159.2015.06.03.07.29.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jun 2015 07:29:45 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) client-ip=209.85.217.181; Received: by lbcue7 with SMTP id ue7so8243989lbc.0 for ; Wed, 03 Jun 2015 07:29:45 -0700 (PDT) X-Received: by 10.152.27.1 with SMTP id p1mr31749450lag.112.1433341785226; Wed, 03 Jun 2015 07:29:45 -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 hn6csp3909930lbb; Wed, 3 Jun 2015 07:29:44 -0700 (PDT) X-Received: by 10.55.17.133 with SMTP id 5mr61193991qkr.18.1433341783488; Wed, 03 Jun 2015 07:29:43 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id n186si731139qhb.116.2015.06.03.07.29.42 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 03 Jun 2015 07:29:43 -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]:35903 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z09fq-0000c0-GM for patch@linaro.org; Wed, 03 Jun 2015 10:29:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59680) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z09cu-0003jy-VT for qemu-devel@nongnu.org; Wed, 03 Jun 2015 10:26:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z09cq-0006w8-Nx for qemu-devel@nongnu.org; Wed, 03 Jun 2015 10:26:40 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:57910) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z09cq-0006vW-GL; Wed, 03 Jun 2015 10:26:36 -0400 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id EF55E407C8; Wed, 3 Jun 2015 17:26:33 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.tls.msk.ru (Postfix) with SMTP id C2604A65; Wed, 3 Jun 2015 16:08:54 +0300 (MSK) Received: (nullmailer pid 27437 invoked by uid 1000); Wed, 03 Jun 2015 13:08:52 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Wed, 3 Jun 2015 16:08:32 +0300 Message-Id: <9f9b026dc60398224fb035eb27ae0ed083d2d66f.1433336870.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 86.62.121.231 Cc: qemu-trivial@nongnu.org, Michael Tokarev , Shannon Zhao , Shannon Zhao Subject: [Qemu-devel] [PULL 12/30] hw/arm/omap_sx1.c: Fix memory leak spotted by valgrind 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: mjt@tls.msk.ru 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.181 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 Signed-off-by: Michael Tokarev --- hw/arm/omap_sx1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/omap_sx1.c b/hw/arm/omap_sx1.c index 671e02c..4b0f7f9 100644 --- a/hw/arm/omap_sx1.c +++ b/hw/arm/omap_sx1.c @@ -103,7 +103,6 @@ static void sx1_init(MachineState *machine, const int version) struct omap_mpu_state_s *mpu; MemoryRegion *address_space = get_system_memory(); MemoryRegion *flash = g_new(MemoryRegion, 1); - MemoryRegion *flash_1 = g_new(MemoryRegion, 1); MemoryRegion *cs = g_new(MemoryRegion, 4); static uint32_t cs0val = 0x00213090; static uint32_t cs1val = 0x00215070; @@ -165,6 +164,7 @@ static void sx1_init(MachineState *machine, const int version) if ((version == 1) && (dinfo = drive_get(IF_PFLASH, 0, fl_idx)) != NULL) { + MemoryRegion *flash_1 = g_new(MemoryRegion, 1); memory_region_init_ram(flash_1, NULL, "omap_sx1.flash1-0", flash1_size, &error_abort); vmstate_register_ram_global(flash_1);