Make "struct tree" contain the pointer to the tree buffer
[git/git.git] / builtin-rev-list.c
index 5277d3c..72c1549 100644 (file)
@@ -136,10 +136,11 @@ static struct object_list **process_tree(struct tree *tree,
                        p = process_tree(entry->item.tree, p, &me, entry->name);
                else
                        p = process_blob(entry->item.blob, p, &me, entry->name);
-               free(entry->name);
                free(entry);
                entry = next;
        }
+       free(tree->buffer);
+       tree->buffer = NULL;
        return p;
 }