Re: [PATCH] btrfs-progs: mkfs/rootdir: Fix memory leak in traverse_directory()

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

 



On Wed, Feb 14, 2018 at 03:50:06PM +0800, Qu Wenruo wrote:
> The bug is exposed by mkfs test case 009, with D=asan.
> 
> We are leaking memory of parent_dir_entry->path() which ,except the
> rootdir, is allocated by strdup().
> 
> Before fixing it, unifiy the allocation of parent_dir_entry() to heap
> allocation.
> 
> Then fix it by adding "free(parent_dir_entry->path);" in
> traverse_directory() and error handler.
> 
> Signed-off-by: Qu Wenruo <wqu@xxxxxxxx>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux