diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2010-10-03 23:34:27 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-10-06 10:46:05 -0700 |
commit | 9173912be36c4f967f42f176be767fc5ba3c4077 (patch) | |
tree | 013bd62b59f7b4ce95a00f8d7424a5d47ceefde3 /upload-pack.c | |
parent | diffcore-pickaxe.c: remove unnecessary curly braces (diff) | |
download | tgif-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 'upload-pack.c')
0 files changed, 0 insertions, 0 deletions