From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kara Date: Mon, 27 Jul 2015 12:32:38 +0000 Subject: Re: [patch] ext4: memory leak on error in ext4_symlink() Message-Id: <20150727123238.GD4891@quack.suse.cz> List-Id: References: <20150724110533.GA14424@mwanda> In-Reply-To: <20150724110533.GA14424@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Dan Carpenter Cc: Theodore Ts'o , Jan Kara , Andreas Dilger , linux-ext4@vger.kernel.org, kernel-janitors@vger.kernel.org On Fri 24-07-15 14:05:33, Dan Carpenter wrote: > We should release "sd" before returning. > > Fixes: 0fa12ad1b285 ('ext4: Handle error from dquot_initialize()') > Signed-off-by: Dan Carpenter Thanks! I've added the fix to my tree. Honza > diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c > index d3ff837..9f61e76 100644 > --- a/fs/ext4/namei.c > +++ b/fs/ext4/namei.c > @@ -3084,7 +3084,7 @@ static int ext4_symlink(struct inode *dir, > > err = dquot_initialize(dir); > if (err) > - return err; > + goto err_free_sd; > > if ((disk_link.len > EXT4_N_BLOCKS * 4)) { > /* > -- Jan Kara SUSE Labs, CR