From f562bf0fbed0fdec668e988306638c16d26c0ad6 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 3 Nov 2017 08:42:21 -0600 Subject: [PATCH] Another fix from recent PR: mac802154_primitive_free() does not exist. Perhaps ieee802154_primitive_free() is what was intended? --- wireless/ieee802154/mac802154_netdev.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/wireless/ieee802154/mac802154_netdev.c b/wireless/ieee802154/mac802154_netdev.c index 333bb3674b..84e58ed867 100644 --- a/wireless/ieee802154/mac802154_netdev.c +++ b/wireless/ieee802154/mac802154_netdev.c @@ -1076,7 +1076,7 @@ static int macnet_ioctl(FAR struct net_driver_s *dev, int cmd, /* Try popping an event off the queue */ primitive = (FAR struct ieee802154_primitive_s *) - sq_remfirst(&priv->primitive_queue); + sq_remfirst(&priv->primitive_queue); /* If there was an event to pop off, copy it into the user * data and free it from the MAC layer's memory. @@ -1084,11 +1084,12 @@ static int macnet_ioctl(FAR struct net_driver_s *dev, int cmd, if (primitive != NULL) { - memcpy(&netmac->u, primitive, sizeof(struct ieee802154_primitive_s)); + memcpy(&netmac->u, primitive, + sizeof(struct ieee802154_primitive_s)); - /* Free the notification */ + /* Free the event */ - mac802154_primitive_free(priv->md_mac, primitive); + ieee802154_primitive_free(primitive); ret = OK; break; }