Unverified Commit 01c2a11a authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!9802 ax25: Fix reference count leak issue of net_device

parents 3b421b60 c2968f7b
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -118,15 +118,10 @@ void ax25_dev_device_down(struct net_device *dev)
	list_for_each_entry(s, &ax25_dev_list, list) {
		if (s == ax25_dev) {
			list_del(&s->list);
			goto unlock_put;
			break;
		}
	}
	dev->ax25_ptr = NULL;
	spin_unlock_bh(&ax25_dev_lock);
	ax25_dev_put(ax25_dev);
	return;

unlock_put:
	dev->ax25_ptr = NULL;
	spin_unlock_bh(&ax25_dev_lock);
	netdev_put(dev, &ax25_dev->dev_tracker);