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(
1834
1834
iter = git__calloc (1 , sizeof (filesystem_iterator ));
1835
1835
GITERR_CHECK_ALLOC (iter );
1836
1836
1837
+ iter -> base .type = type ;
1838
+ iter -> base .cb = & callbacks ;
1839
+
1837
1840
root_len = strlen (root );
1838
1841
1839
1842
iter -> root = git__malloc (root_len + 2 );
@@ -1851,9 +1854,6 @@ static int iterator_for_filesystem(
1851
1854
if ((error = git_buf_puts (& iter -> current_path , iter -> root )) < 0 )
1852
1855
goto on_error ;
1853
1856
1854
- iter -> base .type = type ;
1855
- iter -> base .cb = & callbacks ;
1856
-
1857
1857
if ((error = iterator_init_common (& iter -> base , repo , index , options )) < 0 )
1858
1858
goto on_error ;
1859
1859
@@ -1877,8 +1877,6 @@ static int iterator_for_filesystem(
1877
1877
return 0 ;
1878
1878
1879
1879
on_error :
1880
- git__free (iter -> root );
1881
- git_buf_free (& iter -> current_path );
1882
1880
git_iterator_free (& iter -> base );
1883
1881
return error ;
1884
1882
}
You can’t perform that action at this time.
0 commit comments