diff options
author | Jean Delvare <khali@linux-fr.org> | 2008-08-25 11:49:20 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-08-25 13:49:52 +0200 |
commit | 3051e41ab7daaa59d4564f20b25dcb8c03f35f2b (patch) | |
tree | 0908f13da020b0e6e5d025caa60b1fed4c056abc /security | |
parent | c5d44423d55e3abca7b1d544af9e4c97ec203999 (diff) |
ALSA: ASoC: Fix double free and memory leak in many codec drivers
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@linux-fr.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions