Commit 7eb75715 authored by Dan Carpenter's avatar Dan Carpenter Committed by Mauro Carvalho Chehab

[media] rc/redrat3: dereferencing null pointer

In the original code, if the allocation failed we dereference "rr3"
when it was NULL.
Acked-by: default avatarJarod Wilson <jarod@redhat.com>
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 0528f354
...@@ -1186,7 +1186,7 @@ static int __devinit redrat3_dev_probe(struct usb_interface *intf, ...@@ -1186,7 +1186,7 @@ static int __devinit redrat3_dev_probe(struct usb_interface *intf,
rr3 = kzalloc(sizeof(*rr3), GFP_KERNEL); rr3 = kzalloc(sizeof(*rr3), GFP_KERNEL);
if (rr3 == NULL) { if (rr3 == NULL) {
dev_err(dev, "Memory allocation failure\n"); dev_err(dev, "Memory allocation failure\n");
goto error; goto no_endpoints;
} }
rr3->dev = &intf->dev; rr3->dev = &intf->dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment