Fixed two other memory leaks I missed.

This commit is contained in:
Lioncash 2013-01-25 15:07:36 -05:00
parent 1cc74aa6c0
commit 38caedadfa
2 changed files with 4 additions and 0 deletions

View File

@ -67,7 +67,10 @@ bool CheckCPUFeature(const char *feature)
while (token != NULL) while (token != NULL)
{ {
if (strstr(token, feature)) if (strstr(token, feature))
{
fclose(fp);
return true; return true;
}
token = strtok(NULL, " "); token = strtok(NULL, " ");
} }
} }

View File

@ -254,6 +254,7 @@ int FileCopy(char* srcPath, char* destPath, char* fileName)
if(fileId < 0) if(fileId < 0)
{ {
printf("Fail opening %s\n",path); printf("Fail opening %s\n",path);
free(data);
return -1; return -1;
} }
sceIoRead(fileId, data, fileStat.st_size); sceIoRead(fileId, data, fileStat.st_size);