http-walker: cleanup more thoroughly
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
b5e59989eb
commit
09ae9aca14
@ -543,6 +543,23 @@ static int fetch_ref(struct walker *walker, struct ref *ref)
|
||||
|
||||
static void cleanup(struct walker *walker)
|
||||
{
|
||||
struct walker_data *data = walker->data;
|
||||
struct alt_base *alt, *alt_next;
|
||||
|
||||
if (data) {
|
||||
alt = data->alt;
|
||||
while (alt) {
|
||||
alt_next = alt->next;
|
||||
|
||||
free(alt->base);
|
||||
free(alt);
|
||||
|
||||
alt = alt_next;
|
||||
}
|
||||
free(data);
|
||||
walker->data = NULL;
|
||||
}
|
||||
|
||||
http_cleanup();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user