From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lars-Peter Clausen Subject: Re: [alsa-devel] [PATCH] ASoC: simple-card: Add a NULL pointer check in asoc_simple_card_dai_link_of Date: Thu, 05 Mar 2015 13:03:32 +0100 Message-ID: <54F84614.3020108@metafoo.de> References: <20150303132900.GA22246@vishal> <54F76B43.3030602@bfs.de> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: kernel-janitors-owner@vger.kernel.org To: vishal.thanki@gmail.com, wharms@bfs.de Cc: alsa-devel@alsa-project.org, broonie@kernel.org, kernel-janitors@vger.kernel.org, Liam Girdwood List-Id: alsa-devel@alsa-project.org On 03/05/2015 11:45 AM, Vishal Thanki wrote: > I am new to kasprintf. I think we need to make sure of freeing memory > allocated using kasprintf. There is also devm_kasprintf(). But these are really two separate things. One thing is the missing NULL check, which is a bug fix and is fixed by your patch. The other thing is the conversion to kasprintf() which is a code cleanup and should be done in a separate patch. - Lars From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lars-Peter Clausen Date: Thu, 05 Mar 2015 12:03:32 +0000 Subject: Re: [alsa-devel] [PATCH] ASoC: simple-card: Add a NULL pointer check in asoc_simple_card_dai_link_of Message-Id: <54F84614.3020108@metafoo.de> List-Id: References: <20150303132900.GA22246@vishal> <54F76B43.3030602@bfs.de> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: vishal.thanki@gmail.com, wharms@bfs.de Cc: alsa-devel@alsa-project.org, broonie@kernel.org, kernel-janitors@vger.kernel.org, Liam Girdwood On 03/05/2015 11:45 AM, Vishal Thanki wrote: > I am new to kasprintf. I think we need to make sure of freeing memory > allocated using kasprintf. There is also devm_kasprintf(). But these are really two separate things. One thing is the missing NULL check, which is a bug fix and is fixed by your patch. The other thing is the conversion to kasprintf() which is a code cleanup and should be done in a separate patch. - Lars