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:
authorEric Wong <e@80x24.org>2017-03-04 04:50:16 +0300
committerJunio C Hamano <gitster@pobox.com>2017-03-06 21:52:57 +0300
commit5cae73d5d23ec109322948478a957e77d2733f94 (patch)
treec5939d8c6dfd751c83f63a3cea21c239b6749f08 /http-walker.c
parentde46138826cbc8229e25691e613e09ae1f683235 (diff)
http: release strbuf on disabled alternates
This likely has no real-world impact on memory usage, but it is cleaner for future readers. Fixes: abcbdc03895f ("http: respect protocol.*.allow=user for http-alternates") Signed-off-by: Eric Wong <e@80x24.org> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http-walker.c')
-rw-r--r--http-walker.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/http-walker.c b/http-walker.c
index 6396cebe5e..ab7d5537ae 100644
--- a/http-walker.c
+++ b/http-walker.c
@@ -319,6 +319,8 @@ static void process_alternates_response(void *callback_data)
while (tail->next != NULL)
tail = tail->next;
tail->next = newalt;
+ } else {
+ strbuf_release(&target);
}
}
}