提交 2ad88fb2 编写于 作者: G Glenn Ruben Bakke 提交者: Marcel Holtmann

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: NLukasz Duda <lukasz.duda@nordicsemi.no>
Signed-off-by: NGlenn Ruben Bakke <glenn.ruben.bakke@nordicsemi.no>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 fc84242f
......@@ -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;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册