RE: [PATCH] exfat: fix memory leak in exfat_parse_param()

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

 



> On Wed, Jun 03, 2020 at 10:29:57AM +0900, Namjae Jeon wrote:
> 
> > exfat_free() should call exfat_free_iocharset() after stealing
> > param->string instead of kstrdup in exfat_parse_param().
> 
> ITYM
> 	extfat_free() should call exfat_free_iocharset(), to prevent a leak in case we fail after
> parsing iocharset= but before calling
> get_tree_bdev()
> 
> 	Additionally, there's no point copying param->string in
> exfat_parse_param() - just steal it, leaving NULL in param->string.
> That's independent from the leak or fix thereof - it's simply avoiding an extra copy.
Updated it in v2.
Thanks!




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux