Fixed two other memory leaks I missed.
This commit is contained in:
parent
1cc74aa6c0
commit
38caedadfa
2 changed files with 4 additions and 0 deletions
|
@ -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, " ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue