Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-10-12 23:51:32 +0300
committerJunio C Hamano <gitster@pobox.com>2021-10-12 23:51:32 +0300
commitf72187eaf5ac467c60002469a0e0f4433cccb7f4 (patch)
treeb8bfb8be7d703a43eab429a5b90f3857c4c6853b
parent32b6c51888665499f51ba207f6097e6a3c666121 (diff)
parent92a5d1c9b446839a748a465518e5926451b63460 (diff)
Merge branch 'jc/prefix-filename-allocates' into maint
Leakfix. * jc/prefix-filename-allocates: hash-object: prefix_filename() returns allocated memory these days
-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 2e6e2ddd0c..c7b3ad74c6 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);