|
@@ -97,7 +97,10 @@ void stub_complete(struct urb *urb)
|
|
|
|
|
|
/* link a urb to the queue of tx. */
|
|
/* link a urb to the queue of tx. */
|
|
spin_lock_irqsave(&sdev->priv_lock, flags);
|
|
spin_lock_irqsave(&sdev->priv_lock, flags);
|
|
- if (priv->unlinking) {
|
|
|
|
|
|
+ if (sdev->ud.tcp_socket == NULL) {
|
|
|
|
+ usbip_dbg_stub_tx("ignore urb for closed connection %p", urb);
|
|
|
|
+ /* It will be freed in stub_device_cleanup_urbs(). */
|
|
|
|
+ } else if (priv->unlinking) {
|
|
stub_enqueue_ret_unlink(sdev, priv->seqnum, urb->status);
|
|
stub_enqueue_ret_unlink(sdev, priv->seqnum, urb->status);
|
|
stub_free_priv_and_urb(priv);
|
|
stub_free_priv_and_urb(priv);
|
|
} else {
|
|
} else {
|