This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 98d5e118c0 [icmpv6] fix resource leak of icmpv6
98d5e118c0 is described below

commit 98d5e118c0e908d52ee61bad7bd4fd187218c058
Author: meijian <[email protected]>
AuthorDate: Wed Mar 6 10:45:54 2024 +0800

    [icmpv6] fix resource leak of icmpv6
    
    Signed-off-by: meijian <[email protected]>
---
 net/icmpv6/icmpv6_autoconfig.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/net/icmpv6/icmpv6_autoconfig.c b/net/icmpv6/icmpv6_autoconfig.c
index 43bc5ca3b9..804fc6d574 100644
--- a/net/icmpv6/icmpv6_autoconfig.c
+++ b/net/icmpv6/icmpv6_autoconfig.c
@@ -392,6 +392,12 @@ got_lladdr:
       ret = icmpv6_send_message(dev, false);
       if (ret < 0)
         {
+          /* Remove our wait structure from the list (we may no longer be
+           *  at the head of the list).
+           */
+
+          icmpv6_rwait_cancel(&notify);
+
           nerr("ERROR: Failed send router solicitation: %d\n", ret);
           break;
         }

Reply via email to