clone: fix a memory leak of the "git_dir" variable
commit27ff1fbc5dd5ca5f03a65bfc734c913703e8cdf7
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Fri, 22 Oct 2021 08:55:42 +0000 (22 10:55 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sat, 23 Oct 2021 17:45:25 +0000 (23 10:45 -0700)
tree6b45357a4f0ba99d98c46104a59affa3a39e9b15
parentb202e51b15401207667261f2cb384e6faa6ed5c3
clone: fix a memory leak of the "git_dir" variable

At this point in cmd_clone the "git_dir" is always either an
xstrdup()'d string, or something we got from mkpathdup(). Let's free()
it before we clobber it.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/clone.c