Re: [PATCH v5] Bluetooth: btusb: Fix memory leak in play_deferred

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

 



Hi Oliver,

On 07/20/2017 05:11 PM, Oliver Neukum wrote:
>+		if (err < 0) {
>+			if (err != -EPERM && err != -ENODEV)
>+				BT_ERR("%s urb %p submission failed (%d)",
>+				       data->hdev->name, urb, -err);
>+			kfree(urb->setup_packet);
>+			usb_unanchor_urb(urb);
>+			usb_free_urb(urb);
>  			break;
>+		}
>
>  		data->tx_in_flight++;
>+		usb_free_urb(urb);
>+	}
>+
>+	/* Cleanup the rest deferred urbs. */
>+	while ((urb = usb_get_from_anchor(&data->deferred))) {
>+		BT_ERR("%s urb %p submission failed (%d)",
This looks very good, except for this message, which is incorrect.

hmm, since we already print error log when submission failed before, i'll remove this, thanks.


--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux