mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
80c968a04a
gbaudio_dapm_free_controls() iterates over widgets using list_for_each_entry_safe(), which leaves the loop cursor pointing to a meaningless structure if it completes a traversal of the list. The cursor was set to NULL at the end of the loop body, but would be overwritten by the final loop cursor update. Because of this behavior, the widget could be non-null after the loop even if the widget wasn't found, and the cleanup logic would treat the pointer as a valid widget to free. To fix this, introduce a temporary variable to act as the loop cursor and copy it to a variable that can be accessed after the loop finishes. This was detected with the help of Coccinelle. Signed-off-by: Jared Kangas <kangas.jd@gmail.com> Link: https://lore.kernel.org/r/20220605231806.720085-1-kangas.jd@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
||
---|---|---|
.. | ||
axis-fifo | ||
board | ||
clocking-wizard | ||
emxx_udc | ||
fbtft | ||
fieldbus | ||
fwserial | ||
gdm724x | ||
greybus | ||
iio | ||
ks7010 | ||
media | ||
most | ||
nvec | ||
octeon | ||
octeon-usb | ||
olpc_dcon | ||
pi433 | ||
qlge | ||
r8188eu | ||
rtl8192e | ||
rtl8192u | ||
rtl8712 | ||
rtl8723bs | ||
rts5208 | ||
sm750fb | ||
vc04_services | ||
vme_user | ||
vt6655 | ||
vt6656 | ||
wlan-ng | ||
Kconfig | ||
Makefile |