[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: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Alexey Khoroshilov 2013-06-10 16:00:54 -03:00 коммит произвёл Mauro Carvalho Chehab
Родитель 4ef72e3471
Коммит b9d4b2da35
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -1768,6 +1768,8 @@ err_i2c_del_adapter:
i2c_del_adapter(&ttusb->i2c_adap); i2c_del_adapter(&ttusb->i2c_adap);
err_unregister_adapter: err_unregister_adapter:
dvb_unregister_adapter (&ttusb->adapter); dvb_unregister_adapter (&ttusb->adapter);
ttusb_free_iso_urbs(ttusb);
kfree(ttusb);
return result; return result;
} }