summaryrefslogtreecommitdiff
path: root/tree.h
diff options
context:
space:
mode:
authorLibravatar Jonathan Nieder <jrnieder@gmail.com>2010-10-03 23:34:27 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-10-06 10:46:05 -0700
commit9173912be36c4f967f42f176be767fc5ba3c4077 (patch)
tree013bd62b59f7b4ce95a00f8d7424a5d47ceefde3 /tree.h
parentdiffcore-pickaxe.c: remove unnecessary curly braces (diff)
downloadtgif-9173912be36c4f967f42f176be767fc5ba3c4077.tar.xz
init: plug tiny one-time memory leak
The buffer used to construct paths like ".git/objects/info" and ".git/objects/pack" is allocated on the heap and never freed. So free it. While at it, factor out the relevant code into its own function and rename the sha1_dir variable to object_directory (to match the change in everyday usage after the renaming of SHA1_FILE_DIRECTORY in v0.99~603^2~7, 2005). Noticed by valgrind while setting up tests (in test-lib). Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'tree.h')
0 files changed, 0 insertions, 0 deletions