at86rf230: fix race on error handling
authorAlexander Aring <aar@pengutronix.de>
Fri, 19 Feb 2016 08:59:12 +0000 (09:59 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 23 Feb 2016 19:29:39 +0000 (20:29 +0100)
commitc231c5a47a0c697e7bc821af0b5cb28d129fe8e0
tree1c58bf588f6f7467b318badff837b3d86d2ce719
parent07b0188adf7298bf80a9890d3e90f27e973623d3
at86rf230: fix race on error handling

The resource "ctx" can be still used by at86rf230_async_state_change, we
need to free it at the complete handler of the async state change to
avoid a use after free.

Signed-off-by: Alexander Aring <aar@pengutronix.de>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/net/ieee802154/at86rf230.c