[riot-notifications] [RIOT-OS/RIOT] gnrc_netif_pkq: fix pktbuf leak (#15435)

Martine Lenders notifications at github.com
Fri Nov 13 09:26:56 CET 2020


@miri64 commented on this pull request.



> @@ -1521,6 +1521,9 @@ static void _send(gnrc_netif_t *netif, gnrc_pktsnip_t *pkt, bool push_back)
         }
         else {
             LOG_ERROR("gnrc_netif: can't queue packet for sending\n");
+            /* If we got here, it means the device was busy and the pkt queue
+             * was full. The packet should be dropped here anyway */
+            gnrc_pktbuf_release(pkt);

We can, actually...

```suggestion
            gnrc_pktbuf_release_error(pkt, EBUSY);
```

e.g.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15435#discussion_r522787679
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20201113/16c8824e/attachment.htm>


More information about the notifications mailing list