initialize te->mode in parse_tree_entry()
diff --git a/lib/object_parse.c b/lib/object_parse.c
index 5b1301e..6421da7 100644
--- a/lib/object_parse.c
+++ b/lib/object_parse.c
@@ -454,6 +454,7 @@ parse_tree_entry(struct got_tree_entry **te, size_t *elen, char *buf,
*te = NULL;
return err;
}
+ (*te)->mode = 0;
while (*p != ' ') {
if (*p < '0' && *p > '7') {
err = got_error(GOT_ERR_BAD_OBJ_DATA);