diff --git a/Common/ArmCPUDetect.cpp b/Common/ArmCPUDetect.cpp index 1775df58f6..afaf6b777b 100644 --- a/Common/ArmCPUDetect.cpp +++ b/Common/ArmCPUDetect.cpp @@ -67,7 +67,10 @@ bool CheckCPUFeature(const char *feature) while (token != NULL) { if (strstr(token, feature)) + { + fclose(fp); return true; + } token = strtok(NULL, " "); } } diff --git a/Tools/SaveTool/main.c b/Tools/SaveTool/main.c index 54a2b34e96..2f575f0265 100644 --- a/Tools/SaveTool/main.c +++ b/Tools/SaveTool/main.c @@ -254,6 +254,7 @@ int FileCopy(char* srcPath, char* destPath, char* fileName) if(fileId < 0) { printf("Fail opening %s\n",path); + free(data); return -1; } sceIoRead(fileId, data, fileStat.st_size);