[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20110511211238.GA11178@core.coreip.homeip.net>
Date: Wed, 11 May 2011 14:12:38 -0700
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Steven Liu <lingjiujianke@...il.com>
Cc: jy0922.shim@...sung.com, linux-kernel@...r.kernel.org,
linux-input@...r.kernel.org, liuqi@...nderst.com
Subject: Re: [PATCH] touchscreen: check kzalloc memory for data first
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists