[DECNET]: Fix refcount
From: Patrick Caulfield <patrick@tykepenguin.com> This patch fixes a bug in the reference counting for the default DECnet device. If the device is changed, then the new device had its refcount decremented rather than the old one! Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f3cab8a0b1
commit
6a57b2ee45
1 changed files with 1 additions and 1 deletions
|
@ -620,7 +620,7 @@ int dn_dev_set_default(struct net_device *dev, int force)
|
|||
}
|
||||
write_unlock(&dndev_lock);
|
||||
if (old)
|
||||
dev_put(dev);
|
||||
dev_put(old);
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue