Skip to content

Commit

Permalink
[DECNET]: Fix refcount
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Patrick Caulfield authored and David S. Miller committed Mar 29, 2006
1 parent f3cab8a commit 6a57b2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/decnet/dn_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 6a57b2e

Please sign in to comment.