1
0
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:
Leandro Lanzieri 2021-03-01 14:46:44 +01:00 committed by GitHub
commit 7faa84ff56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)) {