diff --git a/sys/net/gnrc/network_layer/icmpv6/gnrc_icmpv6.c b/sys/net/gnrc/network_layer/icmpv6/gnrc_icmpv6.c index b65c329d7e88979eb5eb0cf2820b5eec9bbd1a17..bc12e230883bcd5ad9e8fdef21eed2afabcdfbb0 100644 --- a/sys/net/gnrc/network_layer/icmpv6/gnrc_icmpv6.c +++ b/sys/net/gnrc/network_layer/icmpv6/gnrc_icmpv6.c @@ -69,6 +69,7 @@ void gnrc_icmpv6_demux(gnrc_netif_t *netif, gnrc_pktsnip_t *pkt) if (icmpv6->size < sizeof(icmpv6_hdr_t)) { DEBUG("icmpv6: packet too short.\n"); + gnrc_pktbuf_release(pkt); return; } @@ -78,7 +79,7 @@ void gnrc_icmpv6_demux(gnrc_netif_t *netif, gnrc_pktsnip_t *pkt) if (_calc_csum(icmpv6, ipv6, pkt)) { DEBUG("icmpv6: wrong checksum.\n"); - /* don't release: IPv6 does this */ + gnrc_pktbuf_release(pkt); return; }