Message ID | 1412682085-5217-2-git-send-email-daniel@zonque.org (mailing list archive) |
---|---|
State | Accepted |
Commit | decc27b01d584c985c231e73d3b493de6ec07af8 |
Headers | show |
On Tue, Oct 07, 2014 at 01:41:23PM +0200, Daniel Mack wrote: > Coverity spotted an use-after-free condition in snd_soc_remove_platform(). > Fix this by moving snd_soc_component_cleanup() after the debug print > statement which uses the component's string. Applied, thanks.
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 3d8cff6..4c8f8a2 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -4192,10 +4192,10 @@ void snd_soc_remove_platform(struct snd_soc_platform *platform) snd_soc_component_del_unlocked(&platform->component); mutex_unlock(&client_mutex); - snd_soc_component_cleanup(&platform->component); - dev_dbg(platform->dev, "ASoC: Unregistered platform '%s'\n", platform->component.name); + + snd_soc_component_cleanup(&platform->component); } EXPORT_SYMBOL_GPL(snd_soc_remove_platform);
Coverity spotted an use-after-free condition in snd_soc_remove_platform(). Fix this by moving snd_soc_component_cleanup() after the debug print statement which uses the component's string. Signed-off-by: Daniel Mack <daniel@zonque.org> --- sound/soc/soc-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)