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

Re: [lvm-devel] [PATCH 10/23] Fix memory leak of dev_filter on error path



On Wed, Dec 22, 2010 at 11:05:14AM +0100, Zdenek Kabelac wrote:
> I'm not sure about the best logic - so used this as a plain proposal - of
> course both variants could be seen as valid. And as I've been already fixing
> error messages in the function it self, I've put the call of destructor there.
> 
> My idea was - one the persistent_filter_create() is called - it takes
> ownership of the passed struct dev_filter.
 
I don't think it matters which you pick, but add comments to make it clear
who's responsible for cleanup.

Alasdair


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