Fix for refcount leak.
Sponsored by: Mellanox Technologies
This commit is contained in:
parent
d18b4113ed
commit
6af166cc7b
@ -1246,8 +1246,12 @@ static bool validate_ipv4_net_dev(struct net_device *net_dev,
|
||||
return false;
|
||||
|
||||
src_dev = ip_dev_find(net_dev->if_vnet, saddr);
|
||||
if (src_dev != net_dev)
|
||||
if (src_dev != net_dev) {
|
||||
if (src_dev != NULL)
|
||||
dev_put(src_dev);
|
||||
return false;
|
||||
}
|
||||
dev_put(src_dev);
|
||||
|
||||
/*
|
||||
* Make sure the socket address length field
|
||||
|
Loading…
Reference in New Issue
Block a user