[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <53C5656F.9030200@kernel.org>
Date: Tue, 15 Jul 2014 18:31:27 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Himangi Saraogi <himangi774@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-iio@...r.kernel.org, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
CC: Julia Lawall <julia.lawall@...6.fr>,
Lars-Peter Clausen <lars@...afoo.de>
Subject: Re: question regarding drivers/staging/iio/adc/ad7280a.c
On 14/07/14 21:31, Himangi Saraogi wrote:
> Hi,
>
> The code seems to have a memory leak. The function ad7280_attr_init
> calls kasprintf a number of times, which calls kmalloc (or more
> precisely kmalloc_track_caller), but this data does not ever seem to
> be freed. I propose to introduce a devm_ version of kasprintf, which
> will be useful for other files also. I am not very sure that will it
> be useful to introduce a bunch of kfrees, just to remove the memory
> leaks immediately, but I think it would be safer just to devm
> everything, so then one is sure that everything is freed as it should
> be, in the right order.
>
The question here is whether such a memory leak squashing would be
worth applying to stable. Personally I'd go with no. In which case
feel free to fix it via the introduction of a devm version.
Jonathan
> Thanks
> Himangi
--
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