From: roy.qing.li@gmail.com
To: netdev@vger.kernel.org
Subject: [PATCH] ipv6: release idev when ip6_neigh_lookup failed in icmp6_dst_alloc
Date: Fri, 13 Jan 2012 16:33:46 +0800 [thread overview]
Message-ID: <1326443626-19580-1-git-send-email-roy.qing.li@gmail.com> (raw)
From: RongQing.Li <roy.qing.li@gmail.com>
release idev when ip6_neigh_lookup failed in icmp6_dst_alloc
Signed-off-by: RongQing.Li <roy.qing.li@gmail.com>
---
net/ipv6/route.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 07361df..8c2e3ab 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1091,6 +1091,7 @@ struct dst_entry *icmp6_dst_alloc(struct net_device *dev,
else {
neigh = ip6_neigh_lookup(&rt->dst, &fl6->daddr);
if (IS_ERR(neigh)) {
+ in6_dev_put(idev);
dst_free(&rt->dst);
return ERR_CAST(neigh);
}
--
1.7.1
next reply other threads:[~2012-01-13 8:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-13 8:33 roy.qing.li [this message]
2012-01-13 9:48 ` [PATCH] ipv6: release idev when ip6_neigh_lookup failed in icmp6_dst_alloc Eric Dumazet
2012-01-13 18:11 ` David Miller
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=1326443626-19580-1-git-send-email-roy.qing.li@gmail.com \
--to=roy.qing.li@gmail.com \
--cc=netdev@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 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).