* [patch] [media] rc/redrat3: dereferencing null pointer
@ 2011-05-26 8:55 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2011-05-26 8:55 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Jarod Wilson, open list:MEDIA INPUT INFRA..., kernel-janitors
In the original code, if the allocation failed we dereference "rr3"
when it was NULL.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/media/rc/redrat3.c b/drivers/media/rc/redrat3.c
index 5147767..4582ef7 100644
--- a/drivers/media/rc/redrat3.c
+++ b/drivers/media/rc/redrat3.c
@@ -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;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [patch] [media] rc/redrat3: dereferencing null pointer
@ 2011-05-26 8:55 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2011-05-26 8:55 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Jarod Wilson, open list:MEDIA INPUT INFRA..., kernel-janitors
In the original code, if the allocation failed we dereference "rr3"
when it was NULL.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/media/rc/redrat3.c b/drivers/media/rc/redrat3.c
index 5147767..4582ef7 100644
--- a/drivers/media/rc/redrat3.c
+++ b/drivers/media/rc/redrat3.c
@@ -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;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [patch] [media] rc/redrat3: dereferencing null pointer
2011-05-26 8:55 ` Dan Carpenter
@ 2011-05-26 14:51 ` Jarod Wilson
-1 siblings, 0 replies; 4+ messages in thread
From: Jarod Wilson @ 2011-05-26 14:51 UTC (permalink / raw)
To: Dan Carpenter
Cc: Mauro Carvalho Chehab, open list:MEDIA INPUT INFRA..., kernel-janitors
Dan Carpenter wrote:
> 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 <jarod@redhat.com>
--
Jarod Wilson
jarod@redhat.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] [media] rc/redrat3: dereferencing null pointer
@ 2011-05-26 14:51 ` Jarod Wilson
0 siblings, 0 replies; 4+ messages in thread
From: Jarod Wilson @ 2011-05-26 14:51 UTC (permalink / raw)
To: Dan Carpenter
Cc: Mauro Carvalho Chehab, open list:MEDIA INPUT INFRA..., kernel-janitors
Dan Carpenter wrote:
> 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 <jarod@redhat.com>
--
Jarod Wilson
jarod@redhat.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-05-26 14:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-26 8:55 [patch] [media] rc/redrat3: dereferencing null pointer Dan Carpenter
2011-05-26 8:55 ` Dan Carpenter
2011-05-26 14:51 ` Jarod Wilson
2011-05-26 14:51 ` Jarod Wilson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.