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

Re: [lvm-devel] LVM2 ./WHATS_NEW lib/metadata/metadata.c



Hi Dave,

Thanks for committing the patches to CVS.

I found a comment below:

wysochanski sourceware org wrote:
> +	 * FIXME: leak pv->vg_name
> +	 * Adding dm_pool_free(mem, pv->vg_name) - causes warning w/'const'

since 'pv->vg_name' is allocated after 'pv' from the same pool,
freeing 'pv' will free 'pv->vg_name' as well.
So we don't have to do dm_pool_free(mem, pv->vg_name) here.

However,

> +	 * Perhaps pv->vg_name should be initialized to ORPHAN, not alloc'd
> +	 * memory?

I agree moving pv->vg_name allocation outside of _alloc_pv() is better.

Thanks,
-- 
Jun'ichi Nomura, NEC Corporation of America


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