From: Trond Myklebust <Trond.Myklebust@netapp.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [patch] nfs: fix unlikely memory leak
Date: Sat, 06 Mar 2010 14:28:46 +0000 [thread overview]
Message-ID: <1267885726.4688.6.camel@localhost.localdomain> (raw)
In-Reply-To: <20100306120221.GA10702@bicker>
On Sat, 2010-03-06 at 15:02 +0300, Dan Carpenter wrote:
> I'll admit that it's unlikely for the first allocation to fail and
> the second one to succeed. I won't be offended if you ignore this
> patch.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
>
> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
> index eda74c4..f9254fb 100644
> --- a/fs/nfs/nfs4proc.c
> +++ b/fs/nfs/nfs4proc.c
> @@ -5107,6 +5107,7 @@ static int nfs41_proc_async_sequence(struct nfs_client *clp,
> res = kzalloc(sizeof(*res), GFP_KERNEL);
> if (!args || !res) {
> kfree(args);
> + kfree(res);
> nfs_put_client(clp);
> return -ENOMEM;
> }
It's a good point. I will apply...
Cheers
Trond
prev parent reply other threads:[~2010-03-06 14:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-06 12:02 [patch] nfs: fix unlikely memory leak Dan Carpenter
2010-03-06 14:28 ` Trond Myklebust [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=1267885726.4688.6.camel@localhost.localdomain \
--to=trond.myklebust@netapp.com \
--cc=kernel-janitors@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.