Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
http-walker: cleanup more thoroughly
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Tay Ray Chuan authored and Junio C Hamano committed Mar 2, 2010
1 parent b5e5998 commit 09ae9ac
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions http-walker.c
Expand Up @@ -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();
}

Expand Down

0 comments on commit 09ae9ac

Please sign in to comment.