lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87b06c82-5e59-404b-889d-baa1293bd160@collabora.com>
Date: Fri, 27 Sep 2024 12:25:07 +0500
From: Muhammad Usama Anjum <Usama.Anjum@...labora.com>
To: zhangjiao2 <zhangjiao2@...s.chinamobile.com>, akpm@...ux-foundation.org
Cc: Usama.Anjum@...labora.com, shuah@...nel.org, linux-mm@...ck.org,
 linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] selftests/mm: Add missing free.

On 9/27/24 8:01 AM, zhangjiao2 wrote:
> From: zhang jiao <zhangjiao2@...s.chinamobile.com>
> 
> There is a memory leak in mkdirty, just free src before return.
> 
> Signed-off-by: zhang jiao <zhangjiao2@...s.chinamobile.com>
Please find the first patch which missed this free() and add fixes-by tag.

> ---
>  tools/testing/selftests/mm/mkdirty.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/testing/selftests/mm/mkdirty.c b/tools/testing/selftests/mm/mkdirty.c
> index 1db134063c38..af2fce496912 100644
> --- a/tools/testing/selftests/mm/mkdirty.c
> +++ b/tools/testing/selftests/mm/mkdirty.c
> @@ -280,6 +280,7 @@ static void test_uffdio_copy(void)
>  	dst = mmap(NULL, pagesize, PROT_READ, MAP_PRIVATE|MAP_ANON, -1, 0);
>  	if (dst == MAP_FAILED) {
>  		ksft_test_result_fail("mmap() failed\n");
> +		free(src);
>  		return;
>  	}
>  

-- 
BR,
Muhammad Usama Anjum


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ