From: Steven Liu <hidden> Date: 2011-05-11 02:23:20
Hi Joonyoung Shim ,
Can this patch be fixed in?
if kzalloc memroy for data was faild, it will multi free data
memory space. so check the data memory first, is it kzalloc faild
for data, it should goto end and do nothing.
Signed-off-by: LiuQi <redacted>
---
drivers/input/touchscreen/atmel_mxt_ts.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
From: Steven Liu <hidden> Date: 2011-05-11 02:45:50
fixed the code style
new patch is
if kzalloc memroy for data was faild, it will multi free data
memory space. so check the data memory first, is it kzalloc faild
for data, it should goto end and do nothing.
Signed-off-by: LiuQi <redacted>
---
drivers/input/touchscreen/atmel_mxt_ts.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
Hi, Steven.
On 2011-05-11 오전 11:23, Steven Liu wrote:
Hi Joonyoung Shim ,
Can this patch be fixed in?
if kzalloc memroy for data was faild, it will multi free data
memory space. so check the data memory first, is it kzalloc faild
for data, it should goto end and do nothing.
Hmm, I don't think this patch needs. If you see the codes, there is no
multi free data memory, just free data and input_dev. This both free
are no problem because when the pointer is NULL, no operation is
perfomed in the free function.
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Steven,
On Wed, May 11, 2011 at 10:23:16AM +0800, Steven Liu wrote:
Hi Joonyoung Shim ,
Can this patch be fixed in?
if kzalloc memroy for data was faild, it will multi free data
memory space. so check the data memory first, is it kzalloc faild
for data, it should goto end and do nothing.
There is no double-free as both kfree() and input_free_device() know to
ignore NULL pointers and we ensure that both pointers to be initialized
(either point to allocated memory or be NULL). We do not expect either
of the memory allocations to fail so instead of handling failures
separately they are handled both at once.
Thanks.
--
Dmitry