提交 028816bc 编写于 作者: D Dan Carpenter 提交者: Mauro Carvalho Chehab

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: NDan Carpenter <error27@gmail.com>
Acked-by: NJarod Wilson <jarod@redhat.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 590a58d1
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册