Re: [PATCH 1/7] init: plug tiny one-time memory leak

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

 



Jonathan Nieder <jrnieder@xxxxxxxxx> 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.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]