Re: [PATCH] selftests/memfd: fix a memleak

2023-11-21 Thread Mathieu Desnoyers
On 2023-11-21 18:43, Andrew Morton wrote: On Mon, 20 Nov 2023 18:55:06 -0800 zhujun2 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/mem

Re: [PATCH] selftests/memfd: fix a memleak

2023-11-21 Thread Andrew Morton
On Mon, 20 Nov 2023 18:55:06 -0800 zhujun2 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,

[PATCH] selftests/memfd: fix a memleak

2023-11-20 Thread zhujun2
The memory allocated within a function should be released before the function return,otherwise memleak will occur. Signed-off-by: zhujun2 --- tools/testing/selftests/memfd/fuse_test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/memfd/fuse_test.c b/tools/testing/s

Re: [PATCH] selftests/memfd: fix a memleak

2023-11-15 Thread Mathieu Desnoyers
On 2023-11-15 00:45, zhujun2 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 @@ -205,6 +205,7 @@ static pid_t spawn_s

[PATCH] selftests/memfd: fix a memleak

2023-11-14 Thread zhujun2
The memory allocated within a function should be released before the function return,otherwise memleak will occur. Signed-off-by: zhujun2 --- tools/testing/selftests/memfd/fuse_test.c | 3 +++ tools/testing/selftests/memfd/memfd_test.c | 10 ++ 2 files changed, 13 insertions(+) diff -