rc/redrat3: dereferencing null pointer
Subsystems (3)
PATCH 1/1 rc/redrat3: dereferencing null pointer
In the original code, if the allocation failed we dereference "rr3" when it was NULL.
Signed-off-by Dan Carpenter <[email protected]>
drivers/media/rc/redrat3.c +1 -1
@@ -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;
Quoted 2 lines · Dan Carpenter
In the original code, if the allocation failed we dereference "rr3" when it was NULL.
D'oh, yeah, thanks for the fix.
Acked-by Jarod Wilson <[email protected]>
Signature · 2 lines
Jarod Wilson [email protected]