Re: [PATCH v6 10/15] ASoC: hdac_hdmi: Fix possible memory leak in hw_params

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 15, 2016 at 08:57:26PM +0000, Mark Brown wrote:
> On Fri, Feb 12, 2016 at 07:46:10AM +0530, Subhransu S. Prusty wrote:
> > It's possible for hw_params to be called two times. So add NULL
> > check to prevent memory leak.
> 
> Another fix?

Yes but can go in 4.6 as HDMI codec does not get created in 4.5 code. That
is why I didn't send this one in last fixes series

> 
> > -	dd = kzalloc(sizeof(*dd), GFP_KERNEL);
> > -	if (!dd)
> > -		return -ENOMEM;
> > +	dd = (struct hdac_ext_dma_params *)
> > +		snd_soc_dai_get_dma_data(dai, substream);
> 
> If you need to cast away from void * that suggests a problem and it'd
> look a lot neater too.

I suspect there is no need for cast, we seem to ahve a habit for that, let
us check that

-- 
~Vinod

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux