diff options
author | Dan Carpenter <error27@gmail.com> | 2009-11-10 21:03:54 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-13 22:56:54 -0500 |
commit | d0490cfdf440fded2c292cfb8bb9272fc9ef6943 (patch) | |
tree | 6230f8a577136ca2d82d9d00cb36cf8b5a8ae3c3 | |
parent | b8a623bf836ccfab09a5a6daf62116f455082e6e (diff) |
ipmr: missing dev_put() on error path in vif_add()
The other error paths in front of this one have a dev_put() but this one
got missed.
Found by smatch static checker.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Wang Chen <ellre923@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv4/ipmr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index 630a56df7b47..99508d66a642 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
@@ -483,8 +483,10 @@ static int vif_add(struct net *net, struct vifctl *vifc, int mrtsock) | |||
483 | return -EINVAL; | 483 | return -EINVAL; |
484 | } | 484 | } |
485 | 485 | ||
486 | if ((in_dev = __in_dev_get_rtnl(dev)) == NULL) | 486 | if ((in_dev = __in_dev_get_rtnl(dev)) == NULL) { |
487 | dev_put(dev); | ||
487 | return -EADDRNOTAVAIL; | 488 | return -EADDRNOTAVAIL; |
489 | } | ||
488 | IPV4_DEVCONF(in_dev->cnf, MC_FORWARDING)++; | 490 | IPV4_DEVCONF(in_dev->cnf, MC_FORWARDING)++; |
489 | ip_rt_multicast_event(in_dev); | 491 | ip_rt_multicast_event(in_dev); |
490 | 492 | ||