From: Martin Whitaker Date: Wed, 28 Sep 2005 23:35:22 +0000 (-0700) Subject: [ATM]: fix bug in atm address list handling X-Git-Tag: v2.6.14-rc3~53^2~1 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=735631a9196db42631b8817892605ee72e13a58b;p=linux-2.6 [ATM]: fix bug in atm address list handling From: Martin Whitaker Signed-off-by: Chas Williams --- diff --git a/net/atm/addr.c b/net/atm/addr.c index 1c8867f7f5..a30d0bf480 100644 --- a/net/atm/addr.c +++ b/net/atm/addr.c @@ -50,8 +50,10 @@ void atm_reset_addr(struct atm_dev *dev) struct atm_dev_addr *this, *p; spin_lock_irqsave(&dev->lock, flags); - list_for_each_entry_safe(this, p, &dev->local, entry) - kfree(this); + list_for_each_entry_safe(this, p, &dev->local, entry) { + list_del(&this->entry); + kfree(this); + } spin_unlock_irqrestore(&dev->lock, flags); notify_sigd(dev); }