Commit 5cd5d7c4 authored by Clemens Ladisch's avatar Clemens Ladisch Committed by Takashi Iwai
Browse files

ALSA: usb-audio: fix rate_list memory leak

The array of sample rates is reallocated every time when opening
the PCM device, but was freed only once when unplugging the device.
Reported-by: default avatar"Alexander E. Patrakov" <>
Cc: <>
Signed-off-by: default avatarClemens Ladisch <>
Signed-off-by: default avatarTakashi Iwai <>
parent adcc70b2
......@@ -788,6 +788,9 @@ static int snd_usb_pcm_check_knot(struct snd_pcm_runtime *runtime,
int count = 0, needs_knot = 0;
int err;
subs->rate_list.list = NULL;
list_for_each_entry(fp, &subs->fmt_list, list) {
return 0;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment