Hi Junio, On Sun, 30 Apr 2017, Junio C Hamano wrote: > Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes: > > >> Hmph. I find a "leak" of a resource acquired inside the main > >> function and not released when the main function leaves a lot less > >> interesting than the other ones this series covers. > > > > Ah, I missed that this falls squarely into the "one-shot programs are > > allowed to be sloppy in their memory management, essentially using > > exit() as garbage collector" category. > > I actually think it was a good intention of yours and I would agree > with the patch. The automated tools that find and complain about > these issues do not know about our local house rules like "do not > bother freeing immediately before exit" and will keep notifying us > of leaks. In Coverity, I marked them as "Intentional", so that they can be dropped from the default view. Unfortunately, the verdict "Intentional" does not percolate to other projects, so I will probably have to do the entire shebang in the `git` project again. Of course, we could also decide that we want to shut up static analyzers by actually *not* leaking memory, by *not* using exit() as our garbage collector in one-shot commands, with the added benefit of making the code easier to libify/reuse. But I fear that I distract the discussion away from a more focused attention to the actual patch series, which is actually still in flight and in actual need for review, as I actually want to get those patches integrated into git.git. Ciao, Dscho