[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAOM0=dbM_WSkPAEKtC7_h2eZ4RUBMrhW4Q+QodXkXkWVLna4Vw@mail.gmail.com>
Date: Sat, 12 Nov 2022 17:45:34 +0530
From: A <amit234234234234@...il.com>
To: Willy Tarreau <w@....eu>
Cc: linux-kernel@...r.kernel.org
Subject: Re: Setting variable NULL after freeing it.
On Sat, Nov 12, 2022 at 5:31 PM Willy Tarreau <w@....eu> wrote:
>
> 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
Yeah, may be they want to save the time the kernel will spend in doing
(x) = NULL.
Amit
Powered by blists - more mailing lists