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>

Eric Wong committed Mar 4, 2017 at 01:50 UTC 5cae73d5d23ec109322948478a957e77d2733f94
1 file changed +2
http-walker.c
+2
@@ -319,6 +319,8 @@ static void process_alternates_response(void *callback_data)
319 while (tail->next != NULL)
320 tail = tail->next;
321 tail->next = newalt;
322 + } else {
323 + strbuf_release(&target);
324 }
325 }
326 }