Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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...
commit 09ae9aca14750f00c9e25fd16cdf60819fb410a8 1 parent b5e5998
Tay Ray Chuan rctay authored gitster committed
Showing with 17 additions and 0 deletions.
  1. +17 −0 http-walker.c
17 http-walker.c
View
@@ -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();
}
Please sign in to comment.
Something went wrong with that request. Please try again.