projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
590a58d
)
V4L/DVB: IR: ir-raw-event: null pointer dereference
author
Dan Carpenter
<error27@gmail.com>
Thu, 12 Aug 2010 07:47:07 +0000
(
04:47
-0300)
committer
Mauro Carvalho Chehab
<mchehab@redhat.com>
Tue, 28 Sep 2010 01:21:46 +0000
(22:21 -0300)
The original code dereferenced ir->raw after freeing it and setting it
to NULL.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/IR/ir-raw-event.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/media/IR/ir-raw-event.c
b/drivers/media/IR/ir-raw-event.c
index 43094e7eccfa92ba6213115ecdab06d88b1387ec..8e0e1b1f8c87ef9f83f05ab6a564e30ddd78aa4c 100644
(file)
--- a/
drivers/media/IR/ir-raw-event.c
+++ b/
drivers/media/IR/ir-raw-event.c
@@
-279,9
+279,11
@@
int ir_raw_event_register(struct input_dev *input_dev)
"rc%u", (unsigned int)ir->devno);
if (IS_ERR(ir->raw->thread)) {
+ int ret = PTR_ERR(ir->raw->thread);
+
kfree(ir->raw);
ir->raw = NULL;
- return
PTR_ERR(ir->raw->thread)
;
+ return
ret
;
}
mutex_lock(&ir_raw_handler_lock);