Fixes for several memory leaks

Lukas Fleischer cgit at cryptocrack.de
Sat Apr 2 22:18:44 CEST 2011


Hi,

I created patches for a whole bunch of memory leaks (probably around 100
leaks altogether) which mostly came up due to assigning newly allocated
strings (using xstrdupn() in most cases) to configuration strings
without free()'ing the previous pointer at all. Note that this doesn't
cover everything by far. There's a lot of more leaks (mainly with repo,
ref and commit handling) which I didn't have time to fix yet tho.

Please review and test in detail before pushing. I tried to cover
everything but I might have missed some tricky parts. I also only did
superficial tests...

Clone URL of my cgit working tree is [1], web interface of the "wip"
branch can be found on [2].

[1] git://git.cryptocrack.de/cgit.git
[2] http://git.cryptocrack.de/cgit.git/?h=wip




More information about the CGit mailing list