From 98d5e118c0e908d52ee61bad7bd4fd187218c058 Mon Sep 17 00:00:00 2001 From: meijian Date: Wed, 6 Mar 2024 10:45:54 +0800 Subject: [PATCH] [icmpv6] fix resource leak of icmpv6 Signed-off-by: meijian --- 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(¬ify); + nerr("ERROR: Failed send router solicitation: %d\n", ret); break; }