Commit 6a57b2ee authored by Patrick Caulfield's avatar Patrick Caulfield Committed by David S. Miller

[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: default avatarDavid S. Miller <davem@davemloft.net>
parent f3cab8a0
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment