From: Dan Carpenter <error27@gmail.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net
Subject: [patch] missing dev_put() on error path in vif_add()
Date: Wed, 11 Nov 2009 14:03:54 +0200 (SAST) [thread overview]
Message-ID: <alpine.DEB.2.00.0911111339100.9485@bicker> (raw)
The other error paths in front of this one have a dev_put() but this one
got missed.
Found by smatch static checker.
regards,
dan carpenter
Signed-off-by: Dan Carpenter <error27@gmail.com>
--- orig/net/ipv4/ipmr.c 2009-11-11 13:34:20.000000000 +0200
+++ devel/net/ipv4/ipmr.c 2009-11-11 13:34:59.000000000 +0200
@@ -483,8 +483,10 @@
return -EINVAL;
}
- if ((in_dev = __in_dev_get_rtnl(dev)) == NULL)
+ if ((in_dev = __in_dev_get_rtnl(dev)) == NULL) {
+ dev_put(dev);
return -EADDRNOTAVAIL;
+ }
IPV4_DEVCONF(in_dev->cnf, MC_FORWARDING)++;
ip_rt_multicast_event(in_dev);
next reply other threads:[~2009-11-11 12:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-11 12:03 Dan Carpenter [this message]
2009-11-12 2:50 ` [patch] missing dev_put() on error path in vif_add() Wang Chen
2009-11-14 3:57 ` 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=alpine.DEB.2.00.0911111339100.9485@bicker \
--to=error27@gmail.com \
--cc=davem@davemloft.net \
--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 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.