Re: [PATCH 8/8] staging: dgap: fix memory leak in dgap_parsefile()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2014-07-15 15:51 GMT+09:00 Dan Carpenter <dan.carpenter@xxxxxxxxxx>:
> 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
>
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux