diff options
author | George Hazan <george.hazan@gmail.com> | 2013-05-06 16:07:39 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-05-06 16:07:39 +0000 |
commit | f94f16702b87c3c876096723f8e6ad94d63847aa (patch) | |
tree | b0cd74c1351429b4748474557aabfd56c2150323 /protocols/Skype/src/skype_events.cpp | |
parent | 27d17244cb0af6f8b04e2b6725d504c336dabb07 (diff) |
more mem leaks
git-svn-id: http://svn.miranda-ng.org/main/trunk@4593 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_events.cpp')
-rw-r--r-- | protocols/Skype/src/skype_events.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/protocols/Skype/src/skype_events.cpp b/protocols/Skype/src/skype_events.cpp index e2622a604b..53a938a30b 100644 --- a/protocols/Skype/src/skype_events.cpp +++ b/protocols/Skype/src/skype_events.cpp @@ -178,15 +178,12 @@ void CSkypeProto::OnMessageReceived(CConversation::Ref &conversation, CMessage:: else
{
message->GetPropAuthor(data);
- wchar_t *sid = ::mir_utf8decodeW(data);
+ mir_ptr<wchar_t> sid( ::mir_utf8decodeW(data));
conversation->GetPropIdentity(data);
- wchar_t *cid = ::mir_utf8decodeW(data);
-
- this->SendChatMessage(cid, sid, ::mir_utf8decodeW(text));
+ mir_ptr<wchar_t> cid( ::mir_utf8decodeW(data));
- ::mir_free(sid);
- ::mir_free(cid);
+ this->SendChatMessage(cid, sid, mir_ptr<wchar_t>(::mir_utf8decodeW(text)));
}
}
@@ -253,7 +250,7 @@ void CSkypeProto::OnMessageSended(CConversation::Ref &conversation, CMessage::Re if (::wcsicmp(nick, L"") == 0)
nick = ::db_get_wsa(NULL, this->m_szModuleName, SKYPE_SETTINGS_LOGIN);
- this->SendChatMessage(cid, nick, ::mir_utf8decodeW(text));
+ this->SendChatMessage(cid, nick, mir_ptr<wchar_t>(::mir_utf8decodeW(text)));
}
}
@@ -493,7 +490,7 @@ void CSkypeProto::OnMessage(CConversation::Ref conversation, CMessage::Ref messa SEString data;
conversation->GetPropIdentity(data);
- wchar_t *cid = ::mir_utf8decodeW(data);
+ mir_ptr<wchar_t> cid( ::mir_utf8decodeW(data));
message->GetPropIdentities(data);
@@ -511,7 +508,6 @@ void CSkypeProto::OnMessage(CConversation::Ref conversation, CMessage::Ref messa }
else if ( !alreadyInChat.contains(sid))
this->KickChatContact(cid, sid);
- ::mir_free(cid);
}
}
break;
@@ -564,10 +560,9 @@ void CSkypeProto::OnMessage(CConversation::Ref conversation, CMessage::Ref messa SEString data;
conversation->GetPropIdentity(data);
- wchar_t *cid = ::mir_utf8decodeW(data);
+ mir_ptr<wchar_t> cid( ::mir_utf8decodeW(data));
HANDLE hContact = this->GetChatRoomByCid(cid);
this->RaiseChatEvent(cid, this->login, /*GC_EVENT_NOTICE*/ 0x0020, /*GCEF_ADDTOLOG*/ 0x0001, 0, NULL, ::TranslateT("There was incoming call"));
- ::mir_free(cid);
}
break;
|