lkml.org 
[lkml]   [2014]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3.13 110/149] ASoC: pcm: free path list before exiting from error conditions
On Sat, Mar 22, 2014 at 03:53:08PM +0000, Ben Hutchings wrote:
> On Thu, 2014-03-20 at 17:04 -0700, Greg Kroah-Hartman wrote:
> > 3.13-stable review patch. If anyone has any objections, please let me know.
> >
> > ------------------
> >
> > From: Patrick Lai <plai@codeaurora.org>
> >
> > commit e4ad1accb28d0ed8cea6f12395d58686ad344ca7 upstream.
> >
> > dpcm_path_get() allocates dynamic memory to hold path list.
> > Corresponding dpcm_path_put() must be called to free the memory.
> > dpcm_path_put() is not called under several error conditions.
> > This leads to memory leak.
>
> This is broken. dpcm_path_get() may return -ENOMEM and not initialise
> the list at all.
>
> If snd_soc_dapm_dai_get_connected_widgets() can fail (I don't think it
> can) then dpcm_path_get() should be responsible for freeing the list
> before returning.

Thanks, now dropped.

greg k-h


\
 
 \ /
  Last update: 2014-03-24 06:21    [W:0.125 / U:0.616 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site