Cong Wang
54a8a79c55
btusb: fix a memory leak in btusb_send_frame()
This patch fixes the following memory leak reported by kmemleak:
unreferenced object 0xffff880060a53840 (size 192):
comm "softirq", pid 0, jiffies 4320571771 (age 1406.569s)
hex dump (first 32 bytes):
01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff81138a1c>] create_object+0x187/0x28b
[<ffffffff814be12e>] kmemleak_alloc+0x73/0x98
[<ffffffff811289d3>] __kmalloc+0xfc/0x123
[<ffffffff81386546>] usb_alloc_urb+0x1e/0x48
[<ffffffffa0130274>] btusb_send_frame+0x86/0x385 [btusb]
[<ffffffffa02d8230>] hci_send_frame+0xa0/0xa5 [bluetooth]
[<ffffffffa02d8a4e>] hci_cmd_task+0xa0/0xfb [bluetooth]
[<ffffffff81058548>] tasklet_action+0x8f/0xef
[<ffffffff81058a4c>] __do_softirq+0xf4/0x1db
[<ffffffff81058bb7>] run_ksoftirqd+0x84/0x129
[<ffffffff8106f1c4>] kthread+0xa0/0xa8
[<ffffffff814dd144>] kernel_thread_helper+0x4/0x10
[<ffffffffffffffff>] 0xffffffffffffffff
The problem is that when inc_tx() returns non-zero, we forgot
to call usb_free_urb().
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: "Gustavo F. Padovan" <padovan@profusion.mobi>
Signed-off-by: WANG Cong <amwang@redhat.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-12-03 08:19:59 +09:00
..
2011-10-26 17:08:43 +02:00
2011-08-18 23:58:11 -04:00
2011-10-25 13:25:22 +02:00
2011-10-25 15:18:39 +02:00
2011-09-22 03:23:13 -04:00
2011-10-25 12:11:02 +02:00
2011-12-03 08:19:59 +09:00
2011-08-02 12:43:50 +02:00
2011-10-26 17:03:38 +02:00
2011-10-26 17:15:03 +02:00
2011-09-28 13:41:50 -04:00
2011-10-26 17:15:03 +02:00
2011-08-25 15:35:03 +02:00
2011-07-28 01:30:07 -07:00
2011-09-13 11:12:12 +02:00
2011-10-02 00:19:34 +02:00
2011-09-13 11:12:15 +02:00
2011-08-18 14:07:15 -07:00
2011-08-04 06:32:51 -10:00
2011-09-16 22:22:10 +02:00
2011-08-08 13:53:49 -07:00
2011-10-13 13:49:37 -06:00
2011-10-25 12:11:02 +02:00
2011-10-25 15:18:39 +02:00
2011-10-11 09:51:22 -06:00
2011-10-24 11:09:48 -07:00
2011-09-15 15:08:18 +02:00
2011-10-25 12:11:02 +02:00
2011-10-19 03:10:46 -04:00
2011-10-25 12:11:02 +02:00
2011-10-26 16:17:32 +02:00
2011-10-26 15:11:09 +02:00
2011-09-27 18:08:04 +02:00
2011-10-26 21:39:42 +02:00
2011-10-25 15:18:39 +02:00
2011-07-30 08:36:02 -10:00
2011-10-25 13:57:45 +02:00
2011-10-25 12:13:59 +02:00
2011-09-21 13:20:21 -07:00
2011-09-27 18:08:04 +02:00
2011-11-02 15:23:13 -04:00
2011-09-21 16:19:44 -04:00
2011-08-04 11:26:24 +01:00
2011-09-13 11:12:05 +02:00
2011-09-27 18:08:04 +02:00
2011-10-18 14:17:40 -07:00
2011-10-26 16:11:53 +02:00
2011-10-17 09:12:42 +01:00
2011-10-25 10:43:57 +02:00
2011-10-07 09:39:51 +02:00
2011-08-19 21:01:46 +04:00
2011-08-25 16:25:34 -07:00
2011-08-01 14:05:46 -10:00
2011-09-14 18:09:38 -07:00
2011-10-25 13:25:22 +02:00
2011-10-26 21:33:50 +02:00
2011-08-08 16:33:54 +09:00
2011-10-04 10:10:50 -06:00
2011-08-24 14:41:41 -04:00
2011-10-26 17:21:19 +02:00
2011-10-25 12:11:02 +02:00
2011-08-02 14:51:57 -04:00
2011-10-26 15:11:09 +02:00
2011-10-18 11:18:57 -07:00
2011-10-25 15:18:39 +02:00
2011-09-15 14:57:08 +02:00
2011-10-26 16:17:32 +02:00
2011-10-24 02:07:21 -04:00
2011-08-25 16:25:33 -07:00
2011-10-26 17:03:38 +02:00
2011-10-26 16:44:09 +02:00
2011-10-24 21:00:34 +02:00
2011-10-26 15:39:02 +02:00
2011-10-26 15:39:02 +02:00