summaryrefslogtreecommitdiff
path: root/http-walker.c
diff options
context:
space:
mode:
authorTay Ray Chuan <rctay89@gmail.com>2010-03-02 18:49:28 +0800
committerJunio C Hamano <gitster@pobox.com>2010-03-02 11:10:36 -0800
commit09ae9aca14750f00c9e25fd16cdf60819fb410a8 (patch)
tree91d346680038b6299d7093b8113ffb807fff2af1 /http-walker.c
parentb5e59989eb20a8d6257760605052fe1d3fefca88 (diff)
downloadgit-09ae9aca14750f00c9e25fd16cdf60819fb410a8.tar.gz
http-walker: cleanup more thoroughly
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http-walker.c')
-rw-r--r--http-walker.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/http-walker.c b/http-walker.c
index 700bc13112..508e35517c 100644
--- a/http-walker.c
+++ b/http-walker.c
@@ -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();
}