From e8da744e6db74202fad0ea12498c43a60e31d2b9 Mon Sep 17 00:00:00 2001
From: Martine Lenders <mail@martine-lenders.eu>
Date: Sun, 30 Dec 2018 01:05:27 +0100
Subject: [PATCH] gnrc_sixlowpan_frag: release packet when frag hdr can't be
 marked

Otherwise, there will be leaks ;-).
---
 sys/net/gnrc/network_layer/sixlowpan/frag/rbuf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/net/gnrc/network_layer/sixlowpan/frag/rbuf.c b/sys/net/gnrc/network_layer/sixlowpan/frag/rbuf.c
index 00d59711f4..8edb73b053 100644
--- a/sys/net/gnrc/network_layer/sixlowpan/frag/rbuf.c
+++ b/sys/net/gnrc/network_layer/sixlowpan/frag/rbuf.c
@@ -137,6 +137,7 @@ void rbuf_add(gnrc_netif_hdr_t *netif_hdr, gnrc_pktsnip_t *pkt,
                         sizeof(sixlowpan_frag_t), GNRC_NETTYPE_SIXLOWPAN);
                 if (frag_hdr == NULL) {
                     gnrc_pktbuf_release(entry->super.pkt);
+                    gnrc_pktbuf_release(pkt);
                     rbuf_rm(entry);
                     return;
                 }
-- 
GitLab