[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221112120109.GA5592@1wt.eu>
Date: Sat, 12 Nov 2022 13:01:09 +0100
From: Willy Tarreau <w@....eu>
To: A <amit234234234234@...il.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: Setting variable NULL after freeing it.
On Sat, Nov 12, 2022 at 05:28:04PM +0530, A wrote:
> I was just thinking that when this is good practice (where its usage
> is genuine), then why is there not a kernel wide macro that would call
> kfree(x) and then set (x) = NULL. So, this will be done automatically
> for everyone and the developer will not have to decide whether to do
> this or not.
Very likely because developers want to decide.
Willy
Powered by blists - more mailing lists