From: Lars-Peter Clausen Date: Wed, 12 Mar 2014 07:34:39 +0000 (+0100) Subject: ASoC: Fix use after free X-Git-Tag: v3.15-rc1~36^2~1^2~5^2~14^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c1d5f091dc39eecf9a34a8be01492d14c23ad91;p=pandora-kernel.git ASoC: Fix use after free Freeing the current list element while iterating over the list will cause a use after free since the iterator function will still use the current element to look up the next. Use list_for_each_safe() and remove the element from the list before freeing it to avoid this. Fixes: 1438c2f60b ("ASoC: Add a per component dai list") Reported-by: Dan Carpenter Signed-off-by: Lars-Peter Clausen Signed-off-by: Mark Brown --- Reading git-diff-tree failed