提交 96c1eb98 编写于 作者: S Sarah Sharp 提交者: Sebastian Andrzej Siewior

UAS: Free status URB when we can't find the SCSI tag.

In the UAS status URB completion handler, we need to free the URB, no
matter what happens.  Fix a bug where we would leak the URB (and its
buffer) if we couldn't find a SCSI command that is associated with this
status phase.
Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
上级 9eb44541
......@@ -246,8 +246,10 @@ static void uas_stat_cmplt(struct urb *urb)
cmnd = sdev->current_cmnd;
else
cmnd = scsi_find_tag(sdev, tag);
if (!cmnd)
if (!cmnd) {
usb_free_urb(urb);
return;
}
switch (iu->iu_id) {
case IU_ID_STATUS:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册