Skip to content

Commit

Permalink
[media] rc/redrat3: dereferencing null pointer
Browse files Browse the repository at this point in the history
In the original code, if the allocation failed we dereference "rr3"
when it was NULL.

Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Dan Carpenter authored and Mauro Carvalho Chehab committed Jul 27, 2011
1 parent 0528f35 commit 7eb7571
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/rc/redrat3.c
Original file line number Diff line number Diff line change
Expand Up @@ -1186,7 +1186,7 @@ static int __devinit redrat3_dev_probe(struct usb_interface *intf,
rr3 = kzalloc(sizeof(*rr3), GFP_KERNEL);
if (rr3 == NULL) {
dev_err(dev, "Memory allocation failure\n");
goto error;
goto no_endpoints;
}

rr3->dev = &intf->dev;
Expand Down

0 comments on commit 7eb7571

Please sign in to comment.