From: Jan Kara <jack@suse.cz>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Theodore Ts'o <tytso@mit.edu>, Jan Kara <jack@suse.com>,
Andreas Dilger <adilger.kernel@dilger.ca>,
linux-ext4@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] ext4: memory leak on error in ext4_symlink()
Date: Mon, 27 Jul 2015 14:32:38 +0200 [thread overview]
Message-ID: <20150727123238.GD4891@quack.suse.cz> (raw)
In-Reply-To: <20150724110533.GA14424@mwanda>
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 <dan.carpenter@oracle.com>
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 <jack@suse.com>
SUSE Labs, CR
prev parent reply other threads:[~2015-07-27 12:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-24 11:05 [patch] ext4: memory leak on error in ext4_symlink() Dan Carpenter
2015-07-27 12:32 ` Jan Kara [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150727123238.GD4891@quack.suse.cz \
--to=jack@suse.cz \
--cc=adilger.kernel@dilger.ca \
--cc=dan.carpenter@oracle.com \
--cc=jack@suse.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).