Re: [PATCH] ASoC: Fix double free and memory leak in many codec drivers

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

 



At Mon, 25 Aug 2008 11:49:20 +0100,
Mark Brown wrote:
> 
> From: Jean Delvare <khali@xxxxxxxxxxxx>
> 
> Many SoC audio codec drivers have improper freeing of memory in error
> paths.
> 
> * codec is allocated in the platform device probe function, but is not
>   freed there in case of error. Instead it is freed in the i2c device
>   probe function's error path. However the success or failure of both
>   functions is not linked, so this could result in a double free (if
>   the platform device is successfully probed, the i2c device probing
>   fails and then the platform driver is unregistered.)
> 
> * codec->private_data is allocated in many platform device probe
>   functions but not freed in their error paths.
> 
> This patch hopefully solves all these problems.
> 
> Signed-off-by: Jean Delvare <khali@xxxxxxxxxxxx>
> Signed-off-by: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>

This looks like a 2.6.27 material, right?
I applied to for-linus branch now.  Thanks.


Takashi
_______________________________________________
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