Diff options
Diffstat (limited to 'source')
-rw-r--r--source/ui-tree.c3
1 file changed, 2 insertions, 1 deletion
diff --git a/source/ui-tree.c b/source/ui-tree.c
index 95ff337..43de1bf 100644
--- a/source/ui-tree.c
+++ b/source/ui-tree.c
@@ -254,7 +254,7 @@ static void print_dir_chain(const struct object_id *oid, char *name, char *rev,
tree = lookup_tree(the_repository, &child.oid);
if (!tree)
- return;
+ break;
free(child.name);
child.name = NULL;
@@ -270,6 +270,7 @@ static void print_dir_chain(const struct object_id *oid, char *name, char *rev,
name = child.name;
}
+ free(child.name);
strbuf_setlen(fullpath, initial_length);
}