From: "Gao Feng" <gfree.wind@foxmail.com>
To: <gfree.wind@foxmail.com>, <pablo@netfilter.org>,
<netfilter-devel@vger.kernel.org>
Subject: RE: [PATCH nf 1/1] netfilter: xt_CT: Fix one possible memleak of timeout
Date: Thu, 6 Apr 2017 19:21:32 +0800 [thread overview]
Message-ID: <006401d2aec7$f284cc80$d78e6580$@foxmail.com> (raw)
In-Reply-To: <1491476698-45220-1-git-send-email-gfree.wind@foxmail.com>
Hi All,
> -----Original Message-----
> From: gfree.wind@foxmail.com [mailto:gfree.wind@foxmail.com]
> Sent: Thursday, April 6, 2017 7:05 PM
> To: pablo@netfilter.org; netfilter-devel@vger.kernel.org
> Cc: Gao Feng <fgao@ikuai8.com>
> Subject: [PATCH nf 1/1] netfilter: xt_CT: Fix one possible memleak of
timeout
>
> From: Gao Feng <fgao@ikuai8.com>
>
> When nf_ct_timeout_ext_add failed in xt_ct_set_timeout, it should free the
> timeout refcnt.
>
> Now goto the err_put_timeout error handler instead of going ahead.
>
> Signed-off-by: Gao Feng <fgao@ikuai8.com>
> ---
> net/netfilter/xt_CT.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/netfilter/xt_CT.c b/net/netfilter/xt_CT.c index
> b008db0..3cd812c 100644
> --- a/net/netfilter/xt_CT.c
> +++ b/net/netfilter/xt_CT.c
> @@ -168,7 +168,7 @@ static void __xt_ct_tg_timeout_put(struct ctnl_timeout
> *timeout)
> }
> timeout_ext = nf_ct_timeout_ext_add(ct, timeout, GFP_ATOMIC);
> if (timeout_ext == NULL)
> - ret = -ENOMEM;
> + goto err_put_timeout;
>
> rcu_read_unlock();
> return ret;
> --
> 1.9.1
>
Sorry, please ignore this patch.
I have sent the v2 patch which keep the -ENOMEM assignment.
Regards
Feng
prev parent reply other threads:[~2017-04-06 11:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-06 11:04 [PATCH nf 1/1] netfilter: xt_CT: Fix one possible memleak of timeout gfree.wind
2017-04-06 11:21 ` Gao Feng [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='006401d2aec7$f284cc80$d78e6580$@foxmail.com' \
--to=gfree.wind@foxmail.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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.