mirror of
https://github.com/suchmememanyskill/TegraExplorer.git
synced 2024-11-22 20:06:43 +00:00
Fix freeing errors in copy-recursive
This commit is contained in:
parent
c2df3d80dd
commit
7f7c2e65ee
1 changed files with 3 additions and 3 deletions
|
@ -240,9 +240,6 @@ int copy_recursive(char *path, char *dstpath){
|
||||||
}
|
}
|
||||||
|
|
||||||
f_closedir(&dir);
|
f_closedir(&dir);
|
||||||
free(startpath);
|
|
||||||
free(destpath);
|
|
||||||
free(destfoldername);
|
|
||||||
|
|
||||||
if (f_stat(startpath, &fno))
|
if (f_stat(startpath, &fno))
|
||||||
return 22;
|
return 22;
|
||||||
|
@ -250,6 +247,9 @@ int copy_recursive(char *path, char *dstpath){
|
||||||
if ((res = f_chmod(destpath, fno.fattrib, 0x3A)))
|
if ((res = f_chmod(destpath, fno.fattrib, 0x3A)))
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
|
free(startpath);
|
||||||
|
free(destpath);
|
||||||
|
free(destfoldername);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
Loading…
Reference in a new issue