[riot-notifications] [RIOT-OS/RIOT] gnrc_ipv6_ext_frag: check return value of msg_try_send() (#15526)

Martine Lenders notifications at github.com
Mon Nov 30 15:55:58 CET 2020

@miri64 commented on this pull request.

> @@ -255,7 +255,12 @@ void gnrc_ipv6_ext_frag_send(gnrc_ipv6_ext_frag_send_t *snd_buf)
     /* tell gnrc_ipv6 to send the above prepared fragment */
     msg.type = GNRC_IPV6_EXT_FRAG_SEND;
     msg.content.ptr = to_send;
-    msg_try_send(&msg, gnrc_ipv6_pid);
+    if (msg_try_send(&msg, gnrc_ipv6_pid) <= 0) {
+        DEBUG("ipv6_ext_frag: Unable to send fragment, canceling fragmentation\n");
+        gnrc_pktbuf_release(to_send);
+        _snd_buf_free(snd_buf);
+        return;

Done! Made it a separate commit, so the other cases of `_snd_buf_free()` are included as well.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20201130/339e3b18/attachment.htm>

More information about the notifications mailing list