Re: [PATCH] omfs: Fix a memory leak bug

From: Bob Copeland
Date: Tue Aug 20 2019 - 10:18:27 EST


On Tue, Aug 20, 2019 at 01:22:59AM -0500, Wenwen Wang wrote:
> In omfs_get_imap(), 'sbi->s_imap' is allocated through kcalloc(). However,
> it is not deallocated in the following execution if 'block' is not less
> than 'sbi->s_num_blocks', leading to a memory leak bug. To fix this issue,
> go to the 'nomem_free' label to free 'sbi->s_imap'.

Nice catch, thanks.

Acked-by: Bob Copeland <me@xxxxxxxxxxxxxxx>

--
Bob Copeland %% https://bobcopeland.com/