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:
authorAndrzej Hunt <ajrhunt@google.com>2021-03-14 21:47:39 +0300
committerJunio C Hamano <gitster@pobox.com>2021-03-15 01:58:00 +0300
commit04fe4d75faa237813960f8dcd45a91bd445de235 (patch)
treed23621a8ae454533ab195ce4d44065c24aca6baf /parse-options.h
parente4de4502e6e32d5ce71fa6fcfc0703a4be411eb7 (diff)
init-db: silence template_dir leak when converting to absolute path
template_dir starts off pointing to either argv or nothing. However if the value supplied in argv is a relative path, absolute_pathdup() is used to turn it into an absolute path. absolute_pathdup() allocates a new string, and we then "leak" it when cmd_init_db() completes. We don't bother to actually free the return value (instead we UNLEAK it), because there's no significant advantage to doing so here. Correctly freeing it would require more significant changes to code flow which would be more noisy than beneficial. Signed-off-by: Andrzej Hunt <ajrhunt@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'parse-options.h')
0 files changed, 0 insertions, 0 deletions