mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:32:45 +01:00
Merge pull request #16584 from jia200x/pr/fix_gnrc_lorawan_memory_leak
gnrc_netif/lorawan: drop netif header on send
This commit is contained in:
commit
05b61e84ae
@ -311,12 +311,15 @@ static int _send(gnrc_netif_t *netif, gnrc_pktsnip_t *payload)
|
||||
dst = gnrc_netif_hdr_get_dst_addr(netif_hdr);
|
||||
|
||||
assert(payload->type == GNRC_NETTYPE_NETIF);
|
||||
head = payload->next;
|
||||
port = dst[0];
|
||||
|
||||
if (netif_hdr->dst_l2addr_len != sizeof(port)) {
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* Remove the netif hdr snip and point to the MSDU */
|
||||
head = gnrc_pktbuf_remove_snip(payload, payload);
|
||||
|
||||
}
|
||||
else {
|
||||
head = payload;
|
||||
|
Loading…
Reference in New Issue
Block a user