On Mon, 20 Nov 2023 18:55:06 -0800 zhujun2 <zhujun2@xxxxxxxxxxxxxxxxxxxx> wrote: > The memory allocated within a function should be released > before the function return,otherwise memleak will occur. > > ... > > --- a/tools/testing/selftests/memfd/fuse_test.c > +++ b/tools/testing/selftests/memfd/fuse_test.c > @@ -217,6 +217,7 @@ static pid_t spawn_sealing_thread(void) > abort(); > } > > + free(stack); > return pid; > } We just freed a thread's stack while it is still running?