Commit e5548b0
usb: oxu210hp-hcd: Fix memory leak in oxu_create
usb_create_hcd will alloc memory for hcd, and we should
call usb_put_hcd to free it when adding fails to prevent
memory leak.
Fixes: b92a78e ("usb host: Oxford OXU210HP HCD driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Link: https://lore.kernel.org/r/20201123145809.1456541-1-zhangqilong3@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 3b78ef0 commit e5548b0
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4152 | 4152 | | |
4153 | 4153 | | |
4154 | 4154 | | |
4155 | | - | |
| 4155 | + | |
| 4156 | + | |
4156 | 4157 | | |
| 4158 | + | |
4157 | 4159 | | |
4158 | 4160 | | |
4159 | 4161 | | |
| |||
0 commit comments