mirror of
https://github.com/torvalds/linux.git
synced 2026-11-27 17:02:17 +00:00
Stanse found that in snd_usb_parse_audio_endpoints, there is a dangling pointer dereference. When snd_usb_parse_audio_format fails, fp is freed, and continue invoked. On the next loop, there is "fp && fp->altsetting == 1 && fp->channels == 1" test, but fp is set from the last iteration (but is bogus) and thus ilegally dereferenced. Set fp to NULL before "continue". Signed-off-by: Jiri Slaby <[email protected]> Acked-by: Daniel Mack <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>