Merged in antmerlino/nuttx/mac802154_primitivebug (pull request #620)

mac802154: Fixes bug where primitive was freed when it shouldn't have been, causing double free call

Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
Anthony Merlino 2018-03-28 15:50:41 +00:00 committed by Gregory Nutt
parent ec4bb7b990
commit 5e1f54ddc3

View File

@ -441,7 +441,7 @@ static void mac802154_notify_worker(FAR void *arg)
if (cb->notify != NULL)
{
ret = cb->notify(cb, primitive);
if (ret <= 0)
if (ret < 0)
{
ieee802154_primitive_free(primitive);
}