提交 b9d4b2da 编写于 作者: A Alexey Khoroshilov 提交者: Mauro Carvalho Chehab

[media] ttusb-budget: fix memory leak in ttusb_probe()

If something goes wrong starting from i2c_add_adapter(),
ttusb->iso_urb[] and ttusb itself are not deallocated.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: NAlexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 4ef72e34
......@@ -1768,6 +1768,8 @@ static int ttusb_probe(struct usb_interface *intf, const struct usb_device_id *i
i2c_del_adapter(&ttusb->i2c_adap);
err_unregister_adapter:
dvb_unregister_adapter (&ttusb->adapter);
ttusb_free_iso_urbs(ttusb);
kfree(ttusb);
return result;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册