1
0
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:
Kevin "Tristate Tom" Weiss 2021-06-25 10:25:01 +02:00 committed by GitHub
commit 05b61e84ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;