[riot-notifications] [RIOT-OS/RIOT] gnrc_ipv6_nib: release packet when NC entry can't be added (#10978)

Martine Lenders notifications at github.com
Mon Feb 11 12:18:41 CET 2019


miri64 commented on this pull request.



> @@ -1130,6 +1130,7 @@ static bool _resolve_addr(const ipv6_addr_t *dst, gnrc_netif_t *netif,
             entry = _nib_nc_add(dst, (netif != NULL) ? netif->pid : 0,
                                 GNRC_IPV6_NIB_NC_INFO_NUD_STATE_INCOMPLETE);
             if (entry == NULL) {
+                gnrc_pktbuf_release(pkt);

For that case we don't land here. Due to lazy evaluation `netif == NULL` is `true` and we go directly into

https://github.com/RIOT-OS/RIOT/blob/f8a7c026f2a83a29323bfcef19b88f8cd28a0d47/sys/net/gnrc/network_layer/ipv6/nib/nib.c#L206-L210

-- 
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/10978#discussion_r255464730
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190211/cfadf8cd/attachment.html>


More information about the notifications mailing list