Re: [PATCH v2] fs: affs: fix a memory leak in affs_remount

2019-10-02 Thread Navid Emamdoost
Thanks David, On Wed, Oct 2, 2019 at 4:22 AM David Sterba wrote: > > On Mon, Sep 30, 2019 at 04:01:10PM -0500, Navid Emamdoost wrote: > > In affs_remount if data is provided it is duplicated into new_opts. > > The allocated memory for new_opts is only released if pare_options fail. > > The

Re: [PATCH v2] fs: affs: fix a memory leak in affs_remount

2019-10-02 Thread David Sterba
On Mon, Sep 30, 2019 at 04:01:10PM -0500, Navid Emamdoost wrote: > In affs_remount if data is provided it is duplicated into new_opts. > The allocated memory for new_opts is only released if pare_options fail. > The release for new_opts is added. A variable that is allocated and freed without use

Re: [PATCH v2] fs: affs: fix a memory leak in affs_remount

2019-10-01 Thread Navid Emamdoost
Hi Markus, thanks for your suggestions for improving the quality of the patch. At the moment I prefer first get a confirmation from contributors about the leak and then work on any possible improvements for the patch. Thanks, Navid. On Tue, Oct 1, 2019 at 3:31 AM Markus Elfring wrote: > > > The

Re: [PATCH v2] fs: affs: fix a memory leak in affs_remount

2019-10-01 Thread Markus Elfring
> The allocated memory for new_opts is only released if pare_options fail. Can the following wording be nicer? The allocated memory for the buffer “new_opts” will be released only if a call of the function “parse_options” failed. > The release for new_opts is added. * How do you think

[PATCH v2] fs: affs: fix a memory leak in affs_remount

2019-09-30 Thread Navid Emamdoost
In affs_remount if data is provided it is duplicated into new_opts. The allocated memory for new_opts is only released if pare_options fail. The release for new_opts is added. Fixes: c8f33d0bec99 ("affs: kstrdup() memory handling") Signed-off-by: Navid Emamdoost --- Changes in v2: -- fix