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 <[email protected]> Reviewed-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent de46138 commit 5cae73d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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)