[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b6f38984-5f89-4a9d-a905-ddcdbd7510a3@redhat.com>
Date: Fri, 12 Sep 2025 11:28:25 +0200
From: David Hildenbrand <david@...hat.com>
To: Haofeng Li <920484857@...com>, Andrew Morton <akpm@...ux-foundation.org>
Cc: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>, Zi Yan <ziy@...dia.com>,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
linux-mm@...ck.org, Haofeng Li <13266079573@....com>,
Haofeng Li <lihaofeng@...inos.cn>
Subject: Re: [PATCH] mm: transhuge-stress: fix potential memory leak on
realloc failure
On 12.09.25 10:20, Haofeng Li wrote:
> From: Haofeng Li <lihaofeng@...inos.cn>
>
> When realloc() fails in transhuge-stress test, the original code
> exits immediately without freeing the previously allocated memory,
> causing a memory leak.
What do you think happens when a process exits? :)
Correct! All memory ever allocated to that process gets freed, avoiding
any memory leaks.
--
Cheers
David / dhildenb
Powered by blists - more mailing lists