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-04-08 02:54:08 +0300
committerJunio C Hamano <gitster@pobox.com>2021-04-08 02:54:08 +0300
commit642a40019c99a42f5f4ed4f3e52b9ab92cd75fe7 (patch)
tree03da4a9395b7d4eda1517fb783e246cfeb80c965 /builtin/ls-remote.c
parent2e36527f23b7f6ae15e6f21ac3b08bf3fed6ee48 (diff)
parent68ffe095a25b4aba1d6aa1386318ddc8dadcf8c2 (diff)
Merge branch 'ah/plugleaks'
Plug or annotate remaining leaks that trigger while running the very basic set of tests. * ah/plugleaks: transport: also free remote_refs in transport_disconnect() parse-options: don't leak alias help messages parse-options: convert bitfield values to use binary shift init-db: silence template_dir leak when converting to absolute path init: remove git_init_db_config() while fixing leaks worktree: fix leak in dwim_branch() clone: free or UNLEAK further pointers when finished reset: free instead of leaking unneeded ref symbolic-ref: don't leak shortened refname in check_symref()
Diffstat (limited to 'builtin/ls-remote.c')
-rw-r--r--builtin/ls-remote.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/ls-remote.c b/builtin/ls-remote.c
index abfa984737..1794548c71 100644
--- a/builtin/ls-remote.c
+++ b/builtin/ls-remote.c
@@ -124,8 +124,6 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix)
int hash_algo = hash_algo_by_ptr(transport_get_hash_algo(transport));
repo_set_hash_algo(the_repository, hash_algo);
}
- if (transport_disconnect(transport))
- return 1;
if (!dest && !quiet)
fprintf(stderr, "From %s\n", *remote->url);
@@ -151,5 +149,7 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix)
}
ref_array_clear(&ref_array);
+ if (transport_disconnect(transport))
+ return 1;
return status;
}