mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 01:03:41 +01:00
Global: Cleanup initialization/pointer checks.
Cleaning up a lot of cases of uninitialized data, unchecked return values for failures, and similar.
This commit is contained in:
1 parent
a7b7bf7826
commit
9cfcbc46e6
41 files changed
+190
-138
No files matched your search
@@ -127,7 +127,13 @@ bool PortManager::Initialize(const unsigned int timeout) {
|
||||
m_leaseDuration = "43200"; // 12 hours
|
||||
m_InitState = UPNP_INITSTATE_BUSY;
|
||||
urls = (UPNPUrls*)malloc(sizeof(struct UPNPUrls));
|
||||
if (!urls)
|
||||
return false;
|
||||
datas = (IGDdatas*)malloc(sizeof(struct IGDdatas));
|
||||
if (!datas) {
|
||||
free(urls);
|
||||
return false;
|
||||
}
|
||||
memset(urls, 0, sizeof(struct UPNPUrls));
|
||||
memset(datas, 0, sizeof(struct IGDdatas));
|
||||
|
||||
|
||||
Reference in new issue
Block a user