forked from luck/tmp_suning_uos_patched
V4L/DVB: IR: ir-raw-event: null pointer dereference
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>
This commit is contained in:
parent
590a58d180
commit
028816bc85
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user