[icmpv6] fix resource leak of icmpv6

Signed-off-by: meijian <meijian@xiaomi.com>
This commit is contained in:
meijian 2024-03-06 10:45:54 +08:00 committed by Xiang Xiao
parent d1789d84e8
commit 98d5e118c0

View File

@ -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;
}