summaryrefslogtreecommitdiff
path: root/protocols/Xfire/src/tools.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-02-23 11:27:13 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-02-23 11:27:13 +0000
commit465f5035c1059262b8e0b938b971f0a26015ca36 (patch)
tree0afd134d261311c96f629547c2a1348e8e905a65 /protocols/Xfire/src/tools.cpp
parent3350965c81488d6019936b3d6bf3b96decaf6709 (diff)
XFire: Minor fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@12243 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Xfire/src/tools.cpp')
-rw-r--r--protocols/Xfire/src/tools.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/protocols/Xfire/src/tools.cpp b/protocols/Xfire/src/tools.cpp
index 5c42c159b1..791b1d2be8 100644
--- a/protocols/Xfire/src/tools.cpp
+++ b/protocols/Xfire/src/tools.cpp
@@ -74,7 +74,7 @@ BOOL str_replace(char*src, char*find, char*rep)
strcat(temp, (src + pos + strlen(find)));
strcpy(src, temp);
- delete temp;
+ delete[] temp;
return TRUE;
}
@@ -350,10 +350,9 @@ BOOL GetServerIPPort(DWORD pid, char*localaddrr, unsigned long localaddr, char*i
}
DWORD size = 0;
- MIB_UDPTABLE_OWNER_PID *ptab;
GetExtendedUdpTable(NULL, &size, FALSE, AF_INET, UDP_TABLE_OWNER_PID, 0);
- ptab = (MIB_UDPTABLE_OWNER_PID*)malloc(size);
+ MIB_UDPTABLE_OWNER_PID *ptab = (MIB_UDPTABLE_OWNER_PID*)malloc(size);
if (ptab == NULL)
return FALSE;
int ret = GetExtendedUdpTable(ptab, &size, FALSE, AF_INET, UDP_TABLE_OWNER_PID, 0);
@@ -561,10 +560,9 @@ BOOL GetServerIPPort2(DWORD pid, char*localaddrr, unsigned long localaddr, char*
}
DWORD size = 0;
- MIB_UDPTABLE_OWNER_PID *ptab;
GetExtendedUdpTable(NULL, &size, FALSE, AF_INET, UDP_TABLE_OWNER_PID, 0);
- ptab = (MIB_UDPTABLE_OWNER_PID*)malloc(size);
+ MIB_UDPTABLE_OWNER_PID *ptab = (MIB_UDPTABLE_OWNER_PID*)malloc(size);
if (ptab == NULL)
return FALSE;
int ret = GetExtendedUdpTable(ptab, &size, FALSE, AF_INET, UDP_TABLE_OWNER_PID, 0);