[media] igorplugusb: fix leaks in error path
authorSean Young <sean@mess.org>
Fri, 19 Feb 2016 14:33:53 +0000 (12:33 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Thu, 3 Mar 2016 14:44:29 +0000 (11:44 -0300)
commita40973ff101ff8d3a42a8222e3119292f4191b07
tree3d62ade9a625a58fac5ddbd4fd4782e99a8c7840
parent050b6c98b42ff77894da2aad34fcf0d4e1fed8e7
[media] igorplugusb: fix leaks in error path

Since rc_allocate_device() uses kmalloc, it can returns NULL,
so need to check,  otherwise, NULL derefenrece can happen.

Reported-by: Insu Yun <wuninsu@gmail.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/rc/igorplugusb.c