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>2020-08-25 00:54:30 +0300
committerJunio C Hamano <gitster@pobox.com>2020-08-25 00:54:30 +0300
commitff20794402177adc52cab849b98fc85f3c2da739 (patch)
treed1feaa58edb34788e38ba0cbef3b4e2018ab4614 /builtin/ls-remote.c
parent11f433f79c790bcb5feae71b0320161d7ab7dea7 (diff)
parent3e19816dc044a4aca4a15276c92f804c44d0f65f (diff)
Merge branch 'jk/unleak-fixes'
Fix some incorrect UNLEAK() annotations. * jk/unleak-fixes: ls-remote: simplify UNLEAK() usage stop calling UNLEAK() before die()
Diffstat (limited to 'builtin/ls-remote.c')
-rw-r--r--builtin/ls-remote.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/builtin/ls-remote.c b/builtin/ls-remote.c
index ea91679f33..092917eca2 100644
--- a/builtin/ls-remote.c
+++ b/builtin/ls-remote.c
@@ -83,6 +83,8 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix)
PARSE_OPT_STOP_AT_NON_OPTION);
dest = argv[0];
+ UNLEAK(sorting);
+
if (argc > 1) {
int i;
pattern = xcalloc(argc, sizeof(const char *));
@@ -107,7 +109,6 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix)
if (get_url) {
printf("%s\n", *remote->url);
- UNLEAK(sorting);
return 0;
}
@@ -122,10 +123,8 @@ 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)) {
- UNLEAK(sorting);
+ if (transport_disconnect(transport))
return 1;
- }
if (!dest && !quiet)
fprintf(stderr, "From %s\n", *remote->url);
@@ -150,7 +149,6 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix)
status = 0; /* we found something */
}
- UNLEAK(sorting);
ref_array_clear(&ref_array);
return status;
}