Skip to content
Commit cbb88db7 authored by Wenwen Wang's avatar Wenwen Wang Committed by Takashi Iwai
Browse files

ALSA: usx2y: fix a double free bug



In usX2Y_In04_init(), a new urb is firstly created through usb_alloc_urb()
and saved to 'usX2Y->In04urb'. Then, a buffer is allocated through
kmalloc() and saved to 'usX2Y->In04Buf'. If the allocation of the buffer
fails, the error code ENOMEM is returned after usb_free_urb(), which frees
the created urb. However, the urb is actually freed at card->private_free
callback, i.e., snd_usX2Y_card_private_free(). So the free operation here
leads to a double free bug.

To fix the above issue, simply remove usb_free_urb().

Signed-off-by: default avatarWenwen Wang <wang6495@umn.edu>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent b60ee2e2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment