From 7f7c2e65eea56782fbc522e7afc353111747ff5d Mon Sep 17 00:00:00 2001 From: "Such Meme, Many Skill" Date: Sat, 22 Feb 2020 19:05:50 +0100 Subject: [PATCH] Fix freeing errors in copy-recursive --- source/tegraexplorer/io.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/tegraexplorer/io.c b/source/tegraexplorer/io.c index b503595..56e4b0e 100644 --- a/source/tegraexplorer/io.c +++ b/source/tegraexplorer/io.c @@ -240,9 +240,6 @@ int copy_recursive(char *path, char *dstpath){ } f_closedir(&dir); - free(startpath); - free(destpath); - free(destfoldername); if (f_stat(startpath, &fno)) return 22; @@ -250,6 +247,9 @@ int copy_recursive(char *path, char *dstpath){ if ((res = f_chmod(destpath, fno.fattrib, 0x3A))) return res; + free(startpath); + free(destpath); + free(destfoldername); return 0; } \ No newline at end of file