File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -1834,6 +1834,9 @@ static int iterator_for_filesystem(
18341834 iter = git__calloc (1 , sizeof (filesystem_iterator ));
18351835 GITERR_CHECK_ALLOC (iter );
18361836
1837+ iter -> base .type = type ;
1838+ iter -> base .cb = & callbacks ;
1839+
18371840 root_len = strlen (root );
18381841
18391842 iter -> root = git__malloc (root_len + 2 );
@@ -1851,9 +1854,6 @@ static int iterator_for_filesystem(
18511854 if ((error = git_buf_puts (& iter -> current_path , iter -> root )) < 0 )
18521855 goto on_error ;
18531856
1854- iter -> base .type = type ;
1855- iter -> base .cb = & callbacks ;
1856-
18571857 if ((error = iterator_init_common (& iter -> base , repo , index , options )) < 0 )
18581858 goto on_error ;
18591859
@@ -1877,8 +1877,6 @@ static int iterator_for_filesystem(
18771877 return 0 ;
18781878
18791879on_error :
1880- git__free (iter -> root );
1881- git_buf_free (& iter -> current_path );
18821880 git_iterator_free (& iter -> base );
18831881 return error ;
18841882}
You can’t perform that action at this time.
0 commit comments