提交 3c626024 编写于 作者: J Jiri Kosina

HID: i2c-hid: fix memory leak during probe

In case we are returning from i2c_hid_probe() through the 'err' or
'err_mem_free' labels, there is noone freeing the buffers allocated by
i2c_hid_alloc_buffers().
Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@gmail.com>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 4a200c3b
......@@ -892,6 +892,7 @@ static int __devinit i2c_hid_probe(struct i2c_client *client,
if (ihid->irq)
free_irq(ihid->irq, ihid);
i2c_hid_free_buffers(ihid);
kfree(ihid);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册