Codebase list ell / 2886779
icmp6: Free ra in icmp6_client_read_handler on ECANCELED Make sure we free @ra in in icmp6_client_read_handler even when icmp6_client_handle_message returns -ECANCELED. Fixes this: ==1088== 1,176 bytes in 9 blocks are definitely lost in loss record 28 of 29 ==1088== at 0x4843839: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==1088== by 0x4808A1: l_malloc (util.c:62) ==1088== by 0x4C0966: icmp6_client_read_handler (icmp6.c:659) ==1088== by 0x4877AF: io_callback (io.c:120) ==1088== by 0x48693C: l_main_iterate (main.c:478) ==1088== by 0x486A0B: l_main_run (main.c:525) ==1088== by 0x486A0B: l_main_run (main.c:507) ==1088== by 0x486C3F: l_main_run_with_signal (main.c:647) ==1088== by 0x404755: main (main.c:532) 8cef9c50c9f4 ("icmp6: Don't crash if client was stopped") Andrew Zaborowski authored 2 years ago Denis Kenzior committed 2 years ago
1 changed file(s) with 1 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
400400 }
401401
402402 r = icmp6_client_handle_message(client, ra, l, &src);
403 if (r == -ECANCELED)
404 return true;
405 else if (r < 0)
403 if (r < 0)
406404 goto done;
407405
408406 /* Stop solicitations */