[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [dm-devel] dm: Fixes memory leak in setup_indexes function
- From: Mike Snitzer <snitzer redhat com>
- To: Shahzad Hussain Bangash <ext-shahzad bangash nokia com>
- Cc: dm-devel <dm-devel redhat com>
- Subject: Re: [dm-devel] dm: Fixes memory leak in setup_indexes function
- Date: Fri, 6 Aug 2010 08:29:21 -0400
On Fri, Aug 06 2010 at 5:36am -0400,
Shahzad Hussain Bangash <ext-shahzad bangash nokia com> wrote:
> Sorry for multiple patches. This patch fixes memory leak in
> setup_indexes function where memory is allocated for indexes pointer by
> dm_vcalloc with the size of NODE_size and is not freed after that
> through the end of the function.
There isn't a leak.
The 2nd loop's "t->index[i] = indexes;" takes ownership of the
dm_vcalloc'd memory. dm_table_destroy() will later free that memory.
Your patch actually introduces a use after free bug.
Regards,
Mike
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]