Re: [PATCH v2] ALSA: usx2y: fix a double free bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 29 Apr 2019 19:45:40 +0200,
Wenwen Wang wrote:
> 
> 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: Wenwen Wang <wang6495@xxxxxxx>

Applied now.  Thanks.


Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux