提交 6a57b2ee 编写于 作者: P Patrick Caulfield 提交者: 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: NDavid S. Miller <davem@davemloft.net>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册