Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3941791ybl; Tue, 20 Aug 2019 04:46:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqzWWh8Zx0Bat46QofQNrn/SHF7BsiNjbnWJ0HwhWio6dRezShnZ+L9TKN4tnuEfy3PWqinW X-Received: by 2002:a62:1d93:: with SMTP id d141mr10678209pfd.40.1566301586714; Tue, 20 Aug 2019 04:46:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566301586; cv=none; d=google.com; s=arc-20160816; b=vIqwyNuLL3kD4PJ/uC0qBUx+RhjGX7Qe7qIv5nELS+/+7gxOsyVH20R7IJHkfSNZtN 5AJupKTwV8abRtmPoW/4ojs7TZVJtVdUh9RObT3pGALb4S09SpV7N+woT43HM5i9PI5W VDsm42T86tQmvl7J8YbI99Nn3B9CunugQWDGowrXxSD/3i8Pd5LzJ2Ghxksoyx/4wZRP N38NfD3KjR4gfZ9C8ZucSNQ5nSvNVNgwJUCwR+DJDOtxbKFDUGg8NCvcckSvVoFEj9Vg XjYDVVxVeZMb8Ju9O1IfCYVo1qchxSjOA8RYj2w6+KOdKFZxyC+Y50wWia+4SC/tjAuk 0x3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=A3ZuQ1PbkRDaAnBXX/42Gl0QqoNdi7l6o44Zs0oIolk=; b=GO6YUdQYlrtP977GucAOEvfJFr25+Kobz//sng9sv36QTyV1+r1+GLl49cd7ifukzy tXsUkNA2T5F2t6Qrm2Lu0rPN3+Gr8qtlxe6AaSqO911286uvsB93JHO0tjtfM9FF00dS Ugw/iIOURIKmRojZW3DzSKvC+bsOQulprm3lT3p8VIhgdm/nNp5OUXWH34pDvUHrvk5y DfCPbIOJ3yuPL0lxk9UagnGuFi9/Hc7vK6uMSjHsp+sKwhF0eL6rJt1W1v7EwAV4ZKhK v5D1t7qqGfVmGNr4UclBiQvCW2AK1ncNJCgie4GSbdyLX4mNqJPKKbQZB6vAKZI+/4rK C4Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gQ8+vsWV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w8si11872127ply.68.2019.08.20.04.46.11; Tue, 20 Aug 2019 04:46:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gQ8+vsWV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729818AbfHTLo7 (ORCPT + 99 others); Tue, 20 Aug 2019 07:44:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:46920 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728409AbfHTLo7 (ORCPT ); Tue, 20 Aug 2019 07:44:59 -0400 Received: from localhost (unknown [106.201.62.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 96B30214DA; Tue, 20 Aug 2019 11:44:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566301498; bh=GKU0MqwQ9Eq5z11rsh56hpHg91nSDePZNnrM6N3PfEg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gQ8+vsWVr97/c7XjDPDGts5rbdcrIM18/Iv9B+D3c6US6KDG8XJUVnV2EAj4JvAKS auCfxGnkrfKrRpUM/MRZk7+LwR4XGn9unVB8nc1AYoOzv2VUDR+YLCuAqjgK/a56fH xZzIJPWoXBCIzbgl+FTm1RBB8K5Y8Yl+fUYzzh7s= Date: Tue, 20 Aug 2019 17:13:46 +0530 From: Vinod Koul To: Wenwen Wang Cc: Peter Ujfalusi , Dan Williams , Kate Stewart , Allison Randal , Thomas Gleixner , Enrico Weigelt , "open list:DMA GENERIC OFFLOAD ENGINE SUBSYSTEM" , open list Subject: Re: [PATCH v2] dmaengine: ti: dma-crossbar: Fix a memory leak bug Message-ID: <20190820114346.GX12733@vkoul-mobl.Dlink> References: <1565938136-7249-1-git-send-email-wenwen@cs.uga.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1565938136-7249-1-git-send-email-wenwen@cs.uga.edu> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16-08-19, 01:48, Wenwen Wang wrote: > In ti_dra7_xbar_probe(), 'rsv_events' is allocated through kcalloc(). Then > of_property_read_u32_array() is invoked to search for the property. > However, if this process fails, 'rsv_events' is not deallocated, leading to > a memory leak bug. To fix this issue, free 'rsv_events' before returning > the error. Applied, thanks -- ~Vinod