aboutsummaryrefslogtreecommitdiffstats
path: root/connect.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-12-17 14:11:52 +0900
committerJunio C Hamano <gitster@pobox.com>2025-12-17 14:11:52 +0900
commit1c22dfde1866eabd61892f263990599b7e7fa2b7 (patch)
tree0b9f3c6abf769c53658b2173ef017286bbcfd0ec /connect.c
parente7ef0ca622016d12a85836928a03959de4537c2f (diff)
parent48176f953fe083e2f15dd4daa2e37c28950135f1 (diff)
downloadgit-1c22dfde1866eabd61892f263990599b7e7fa2b7.tar.gz
Merge branch 'jc/capability-leak'
Leakfix. * jc/capability-leak: connect: plug protocol capability leak
Diffstat (limited to 'connect.c')
-rw-r--r--connect.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/connect.c b/connect.c
index 8352b71faf..c6f76e3082 100644
--- a/connect.c
+++ b/connect.c
@@ -240,6 +240,8 @@ static void process_capabilities(struct packet_reader *reader, size_t *linelen)
size_t nul_location = strlen(line);
if (nul_location == *linelen)
return;
+
+ free(server_capabilities_v1);
server_capabilities_v1 = xstrdup(line + nul_location + 1);
*linelen = nul_location;