summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-09-15 20:15:28 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-09-15 20:15:28 (GMT)
commit44257f7b5244e8adea4cedc4159d8083f1c213c1 (patch)
tree1664a0fb0f486ffe11dbf599080a57c287d5e6b4 /builtin
parent3d141d87897676b81990fb47cdd75a562dd5dad9 (diff)
parent92a5d1c9b446839a748a465518e5926451b63460 (diff)
downloadgit-44257f7b5244e8adea4cedc4159d8083f1c213c1.zip
git-44257f7b5244e8adea4cedc4159d8083f1c213c1.tar.gz
git-44257f7b5244e8adea4cedc4159d8083f1c213c1.tar.bz2
Merge branch 'jc/prefix-filename-allocates'
Leakfix. * jc/prefix-filename-allocates: hash-object: prefix_filename() returns allocated memory these days
Diffstat (limited to 'builtin')
-rw-r--r--builtin/hash-object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/hash-object.c b/builtin/hash-object.c
index 2e6e2dd..c7b3ad7 100644
--- a/builtin/hash-object.c
+++ b/builtin/hash-object.c
@@ -115,7 +115,7 @@ int cmd_hash_object(int argc, const char **argv, const char *prefix)
prefix = setup_git_directory_gently(&nongit);
if (vpath && prefix)
- vpath = xstrdup(prefix_filename(prefix, vpath));
+ vpath = prefix_filename(prefix, vpath);
git_config(git_default_config, NULL);