Commit dde7602ae633a557acdb74c8027335bb2584aa77

Russell Belfer 2013-01-03T13:22:34

Fix memory leak with checkout tree iterator

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/src/checkout.c b/src/checkout.c
index 3428527..a10507a 100644
--- a/src/checkout.c
+++ b/src/checkout.c
@@ -44,7 +44,6 @@ typedef struct {
 	git_checkout_opts opts;
 	bool opts_free_baseline;
 	char *pfx;
-	git_iterator *baseline;
 	git_index *index;
 	git_pool pool;
 	git_vector removes;
@@ -1241,7 +1240,7 @@ cleanup:
 
 	git_diff_list_free(data.diff);
 	git_iterator_free(workdir);
-	git_iterator_free(data.baseline);
+	git_iterator_free(baseline);
 	git__free(actions);
 	git__free(counts);
 	checkout_data_clear(&data);