Skip to content

Commit 5cae73d

Browse files
Eric Wonggitster
authored andcommitted
http: release strbuf on disabled alternates
This likely has no real-world impact on memory usage, but it is cleaner for future readers. Fixes: abcbdc0 ("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>
1 parent de46138 commit 5cae73d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

http-walker.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,8 @@ static void process_alternates_response(void *callback_data)
319319
while (tail->next != NULL)
320320
tail = tail->next;
321321
tail->next = newalt;
322+
} else {
323+
strbuf_release(&target);
322324
}
323325
}
324326
}

0 commit comments

Comments
 (0)