Re: [PATCH] btf: Simplify BTF logic with use of __free(btf_put)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 1 Aug 2025 17:34:51 +0200
Tomas Glozar <tglozar@xxxxxxxxxx> wrote:

> pá 1. 8. 2025 v 17:29 odesílatel Alexei Starovoitov
> <alexei.starovoitov@xxxxxxxxx> napsal:
> >
> > but __free() is imo garbage. It's essence of what's wrong with C++
> >  
> 
> Here, you at least can read the beginning of the function though, and
> see that a free will be done at the end, like Go's defer, right?

I don't know Go, but I'll assume "yes".

I prefer the __free() over goto end; where you need to free up a temporary
variable on error paths.

But regardless. This will just be a difference of opinion, and I respect
that Alexei doesn't want to use it in his code.

-- Steve





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux