summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorGlenn Ruben Bakke <glenn.ruben.bakke@nordicsemi.no>2015-06-17 17:32:26 +0300
committerMarcel Holtmann <marcel@holtmann.org>2015-06-17 20:17:58 +0300
commit2ad88fb2c0ff57372406eff4df8dde020bf1a18d (patch)
tree7c0f56b2e40e11609f2f0612c995d796a296fa66 /net
parentfc84242f7a9731885ae70c0077816fa6fb19c4d5 (diff)
downloadlinux-2ad88fb2c0ff57372406eff4df8dde020bf1a18d.tar.xz
Bluetooth: 6lowpan: Fix double kfree of netdev priv
This patch removes the kfree of the netdev priv in device_event() upon NETDEV_UNREGISTER event. The freeing of memory is taken care of by the netdev destructor. Signed-off-by: Lukasz Duda <lukasz.duda@nordicsemi.no> Signed-off-by: Glenn Ruben Bakke <glenn.ruben.bakke@nordicsemi.no> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/6lowpan.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c
index bc105a91c84a..071f9eb3805d 100644
--- a/net/bluetooth/6lowpan.c
+++ b/net/bluetooth/6lowpan.c
@@ -928,7 +928,7 @@ static void delete_netdev(struct work_struct *work)
unregister_netdev(entry->netdev);
- /* The entry pointer is deleted in device_event() */
+ /* The entry pointer is deleted by the netdev destructor. */
}
static void chan_close_cb(struct l2cap_chan *chan)
@@ -1418,7 +1418,6 @@ static int device_event(struct notifier_block *unused,
BT_DBG("Unregistered netdev %s %p",
netdev->name, netdev);
list_del(&entry->list);
- kfree(entry);
break;
}
}