summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_chat.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-08-06 07:48:28 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-08-06 07:48:28 +0000
commitca2a7e0009653c5f4726b4ec242297b1dbe57119 (patch)
tree1cbe803c99fbacb2e6d03cafd93fc400da2631fa /protocols/Skype/src/skype_chat.cpp
parent364298fae60d675d65e8456f58a27a5bcfce79cc (diff)
memory leaks in Skype
git-svn-id: http://svn.miranda-ng.org/main/trunk@5595 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_chat.cpp')
-rw-r--r--protocols/Skype/src/skype_chat.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/protocols/Skype/src/skype_chat.cpp b/protocols/Skype/src/skype_chat.cpp
index 67b2f71d57..56a26d011b 100644
--- a/protocols/Skype/src/skype_chat.cpp
+++ b/protocols/Skype/src/skype_chat.cpp
@@ -134,12 +134,10 @@ ChatRoom::ChatRoom(const wchar_t *cid, const wchar_t *name, CSkypeProto *ppro) :
ChatRoom::~ChatRoom()
{
- if (this->cid != NULL)
- ::mir_free(this->cid);
- if (this->name != NULL)
- ::mir_free(this->name);
- if (this->me != NULL)
- delete this->me;
+ ::mir_free(this->cid);
+ ::mir_free(this->name);
+ delete this->me;
+ delete this->sys;
this->members.destroy();
}
@@ -664,7 +662,7 @@ void ChatRoom::OnEvent(const ConversationRef &conversation, const MessageRef &me
ptrW sid = ::mir_utf8decodeW(data);
message->GetPropBodyXml(data);
- ptrW text =::mir_utf8decodeW(CSkypeProto::RemoveHtml(data));
+ ptrW text =::mir_utf8decodeW( ptrA(CSkypeProto::RemoveHtml(data)));
uint timestamp;
message->GetPropTimestamp(timestamp);
@@ -1290,7 +1288,7 @@ ChatRoom *CSkypeProto::FindChatRoom(const wchar_t *cid)
GC_INFO gci = {0};
gci.Flags = BYID | DATA;
gci.pszModule = this->m_szModuleName;
- gci.pszID = ::mir_wstrdup(cid);
+ gci.pszID = (wchar_t*)cid;
if ( !::CallServiceSync(MS_GC_GETINFO, 0, (LPARAM)&gci))
return (ChatRoom *)gci.dwItemData;