mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
Merge pull request #16110 from jia200x/pr/fix_gnrc_lorawan_pktbuf
gnrc_netif_lorawan: add missing NULL check
This commit is contained in:
commit
7faa84ff56
@ -93,6 +93,10 @@ void gnrc_lorawan_mcps_indication(gnrc_lorawan_t *mac, mcps_indication_t *ind)
|
||||
gnrc_pktsnip_t *pkt = gnrc_pktbuf_add(NULL, ind->data.pkt->iol_base,
|
||||
ind->data.pkt->iol_len,
|
||||
GNRC_NETTYPE_LORAWAN);
|
||||
if (!pkt) {
|
||||
DEBUG("gnrc_lorawan: mcps_indication: couldn't allocate pktbuf\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!gnrc_netapi_dispatch_receive(GNRC_NETTYPE_LORAWAN, ind->data.port,
|
||||
pkt)) {
|
||||
|
Loading…
Reference in New Issue
Block a user