From: Junio C Hamano Date: Sun, 03 Oct 2010 23:46:18 GMT Subject: Re: [PATCH 1/7] init: plug tiny one-time memory leak Message-ID: <7vpqvqdelx.fsf@alter.siamese.dyndns.org> In-Reply-To: <20101002083122.GB29638@burratino> Jonathan Nieder writes: > The buffer used to construct paths like ".git/objects/info" and > ".git/objects/pack" is allocated on the heap and never freed. While at it it might be a good idea to rename its outdated name to something saner, e.g. object_dir, perhaps? In v0.99 days, it make some sense to call that sha1_dir because we prepopulated 256 subdirectories 00-ff in it, and as an afterthought we reused the buffer to create an extra subdirectory "/pack" there. But we do not create the fan-out in advance since 9106c09 (Create object subdirectories on demand (phase II), 2005-10-09); sha1_dir is not a very good name for the buffer to hold the path to ".git/objects" anymore.