[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHb8M2CS4wVKjP-Ur2UtkXA9KLMudS7+LbmnzpOFxq6hXqy2OQ@mail.gmail.com>
Date: Tue, 15 Jul 2014 18:05:35 +0900
From: DaeSeok Youn <daeseok.youn@...il.com>
To: Dan Carpenter <dan.carpenter@...cle.com>
Cc: Lidza Louina <lidza.louina@...il.com>,
devel <devel@...verdev.osuosl.org>,
Greg KH <gregkh@...uxfoundation.org>,
driverdev-devel@...uxdriverproject.org,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 8/8] staging: dgap: fix memory leak in dgap_parsefile()
2014-07-15 15:51 GMT+09:00 Dan Carpenter <dan.carpenter@...cle.com>:
> On Tue, Jul 15, 2014 at 12:05:14PM +0900, Daeseok Youn wrote:
>> The p->u.board.status is allocated and set a string as
>> "No" once within allocating a node of BNODE type.
>> But it also set again with kstrdup() in case of "STATUS"
>> or "ID". If it is not allocated yet, use kstrdup().
>> If not, use just memcpy().
>
> I don't think a 2 char buffer is always large enough to hold the new
> strings.
>
> Just free it and allocate again.
Yes, I will send this again.
Thanks.
regards,
Daeseok Youn.
>
> regards,
> dan carpenter
>
--
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