From: Eric Wong Date: Sat, 4 Mar 2017 01:50:16 +0000 (+0000) Subject: http: release strbuf on disabled alternates X-Git-Tag: v2.13.0-rc0~117^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5cae73d5d23ec109322948478a957e77d2733f94;p=thirdparty%2Fgit.git 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 Reviewed-by: Jeff King Signed-off-by: Junio C Hamano --- 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); } } }