Fix some resource leaks/memory leaks.

This commit is contained in:
Lioncash committed 2013-01-25 13:00:50 -05:00
1 parent 4c313e31ac
commit b897309eaf
3 files changed
+29 -7

No files matched your search

+6
View File
@@ -44,6 +44,8 @@ char *GetCPUString()
// INFO_LOG(BOOT, "CPU: %s", cpu_string);
break;
}
fclose(fp);
return cpu_string;
}
bool CheckCPUFeature(const char *feature)
@@ -69,6 +71,8 @@ bool CheckCPUFeature(const char *feature)
token = strtok(NULL, " ");
}
}
fclose(fp);
return false;
}
#endif
@@ -94,6 +98,8 @@ int GetCoreCount()
continue;
++cores;
}
fclose(fp);
return cores;
#endif
}