diff options
-rw-r--r-- | protocols/MRA/src/MraAvatars.cpp | 4 | ||||
-rw-r--r-- | protocols/MRA/src/MraSendQueue.cpp | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/protocols/MRA/src/MraAvatars.cpp b/protocols/MRA/src/MraAvatars.cpp index c8d3466d1c..2e757f7a66 100644 --- a/protocols/MRA/src/MraAvatars.cpp +++ b/protocols/MRA/src/MraAvatars.cpp @@ -56,7 +56,7 @@ DWORD CMraProto::MraAvatarsQueueInitialize(HANDLE *phAvatarsQueueHandle) if (phAvatarsQueueHandle == NULL)
return ERROR_INVALID_HANDLE;
- MRA_AVATARS_QUEUE *pmraaqAvatarsQueue = (MRA_AVATARS_QUEUE*)mir_calloc(sizeof(MRA_AVATARS_QUEUE));
+ MRA_AVATARS_QUEUE *pmraaqAvatarsQueue = new MRA_AVATARS_QUEUE();
if (pmraaqAvatarsQueue == NULL)
return GetLastError();
@@ -131,7 +131,7 @@ void CMraProto::MraAvatarsQueueDestroy(HANDLE hAvatarsQueueHandle) ListMTDestroy(pmraaqAvatarsQueue);
Netlib_CloseHandle(pmraaqAvatarsQueue->hNetlibUser);
- mir_free(pmraaqAvatarsQueue);
+ delete pmraaqAvatarsQueue;
}
DWORD CMraProto::MraAvatarsQueueAdd(HANDLE hAvatarsQueueHandle, DWORD dwFlags, MCONTACT hContact, DWORD *pdwAvatarsQueueID)
diff --git a/protocols/MRA/src/MraSendQueue.cpp b/protocols/MRA/src/MraSendQueue.cpp index 4e17b3a4f0..80b9f20b1a 100644 --- a/protocols/MRA/src/MraSendQueue.cpp +++ b/protocols/MRA/src/MraSendQueue.cpp @@ -27,9 +27,7 @@ DWORD MraSendQueueInitialize(DWORD dwSendTimeOutInterval, HANDLE *phSendQueueHan if (!phSendQueueHandle)
return ERROR_INVALID_HANDLE;
- MRA_SEND_QUEUE *pmrasqSendQueue = (MRA_SEND_QUEUE*)mir_calloc(sizeof(MRA_SEND_QUEUE));
- if (!pmrasqSendQueue)
- return GetLastError();
+ MRA_SEND_QUEUE *pmrasqSendQueue = new MRA_SEND_QUEUE();
DWORD dwRetErrorCode = ListMTInitialize(pmrasqSendQueue);
if (dwRetErrorCode == NO_ERROR) {
@@ -55,7 +53,7 @@ void MraSendQueueDestroy(HANDLE hSendQueueHandle) }
ListMTDestroy(pmrasqSendQueue);
- mir_free(pmrasqSendQueue);
+ delete pmrasqSendQueue;
}
|