aboutsummaryrefslogtreecommitdiffstats
path: root/transport.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-04-07 16:54:08 -0700
committerJunio C Hamano <gitster@pobox.com>2021-04-07 16:54:08 -0700
commit642a40019c99a42f5f4ed4f3e52b9ab92cd75fe7 (patch)
tree03da4a9395b7d4eda1517fb783e246cfeb80c965 /transport.c
parent2e36527f23b7f6ae15e6f21ac3b08bf3fed6ee48 (diff)
parent68ffe095a25b4aba1d6aa1386318ddc8dadcf8c2 (diff)
downloadgit-642a40019c99a42f5f4ed4f3e52b9ab92cd75fe7.tar.gz
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 'transport.c')
-rw-r--r--transport.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/transport.c b/transport.c
index 1c4ab676d1..eb4b2d4e47 100644
--- a/transport.c
+++ b/transport.c
@@ -1452,6 +1452,8 @@ int transport_disconnect(struct transport *transport)
int ret = 0;
if (transport->vtable->disconnect)
ret = transport->vtable->disconnect(transport);
+ if (transport->got_remote_refs)
+ free_refs((void *)transport->remote_refs);
free(transport);
return ret;
}