Commit 15e6a5afb9217b09e60cd0aef48e0a7781f3922f

Edward Thomson 2015-12-01T08:45:55

Merge pull request #3527 from pks-t/pks/tree-entry-memleak tree: mark cloned tree entries as un-pooled

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/tree.c b/src/tree.c
index 0a32868..0e3738a 100644
--- a/src/tree.c
+++ b/src/tree.c
@@ -253,6 +253,8 @@ int git_tree_entry_dup(git_tree_entry **dest, const git_tree_entry *source)
 
 	memcpy(copy, source, total_size);
 
+	copy->pooled = 0;
+
 	*dest = copy;
 	return 0;
 }