diff options
author | Dan Carpenter <error27@gmail.com> | 2009-11-11 02:03:54 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-13 19:56:54 -0800 |
commit | d0490cfdf440fded2c292cfb8bb9272fc9ef6943 (patch) | |
tree | 6230f8a577136ca2d82d9d00cb36cf8b5a8ae3c3 /net/ipv4/ipmr.c | |
parent | b8a623bf836ccfab09a5a6daf62116f455082e6e (diff) | |
download | kernel_samsung_tuna-d0490cfdf440fded2c292cfb8bb9272fc9ef6943.zip kernel_samsung_tuna-d0490cfdf440fded2c292cfb8bb9272fc9ef6943.tar.gz kernel_samsung_tuna-d0490cfdf440fded2c292cfb8bb9272fc9ef6943.tar.bz2 |
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>
Diffstat (limited to 'net/ipv4/ipmr.c')
-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 630a56d..99508d6 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) 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); |