ALSA: usb-audio: Remove from list in snd_usb_endpoint_free()
diff mbox

Message ID
State New, archived
Headers show

Commit Message

Takashi Iwai June 26, 2014, 4:14 p.m. UTC
snd_usb_endpoint_free() deallocates the object but it doesn't unlink
from the list.  This is actually no problem in the current usage
because all elements are freed at once, but it's more consistent to do
a proper unlinking there.

Reported-by: Julia Lawall <>
Signed-off-by: Takashi Iwai <>

This is a 3.17 material.

 sound/usb/endpoint.c | 1 +
 1 file changed, 1 insertion(+)

diff mbox

diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index 114e3e7ff511..304f36bf29cb 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -1011,6 +1011,7 @@  void snd_usb_endpoint_free(struct list_head *head)
 	struct snd_usb_endpoint *ep;
 	ep = list_entry(head, struct snd_usb_endpoint, list);
+	list_del(head);