diff options
author | George Hazan <george.hazan@gmail.com> | 2013-05-06 15:42:54 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-05-06 15:42:54 +0000 |
commit | 27d17244cb0af6f8b04e2b6725d504c336dabb07 (patch) | |
tree | 397c9ff1289c02c4a886e06919f8c67fd6d92e5d /protocols/Skype/src/skype_events.cpp | |
parent | 14eec47b6101e1f96437f7bb1057ee04a3cc4f63 (diff) |
memory leaks
git-svn-id: http://svn.miranda-ng.org/main/trunk@4592 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_events.cpp')
-rw-r--r-- | protocols/Skype/src/skype_events.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/protocols/Skype/src/skype_events.cpp b/protocols/Skype/src/skype_events.cpp index dd45a37b42..e2622a604b 100644 --- a/protocols/Skype/src/skype_events.cpp +++ b/protocols/Skype/src/skype_events.cpp @@ -53,7 +53,7 @@ int CSkypeProto::OnContactDeleted(WPARAM wParam, LPARAM lParam) {
if (this->IsChatRoom(hContact))
{
- wchar_t *chatID = ::db_get_wsa(hContact, this->m_szModuleName, "ChatRoomID");
+ mir_ptr<wchar_t> chatID(::db_get_wsa(hContact, this->m_szModuleName, "ChatRoomID"));
this->LeaveChat(chatID);
CConversation::Ref conversation;
@@ -107,7 +107,7 @@ int __cdecl CSkypeProto::OnTabSRMMButtonPressed(WPARAM wParam, LPARAM lParam) if (this->IsOnline() && !this->IsChatRoom(hContact))
{
StringList targets;
- targets.insert(::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_LOGIN));
+ targets.insert( mir_ptr<wchar_t>(::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_LOGIN)));
this->StartChat(targets);
}
@@ -247,18 +247,13 @@ void CSkypeProto::OnMessageSended(CConversation::Ref &conversation, CMessage::Re else
{
conversation->GetPropIdentity(data);
- wchar_t *cid = ::mir_utf8decodeW(data);
+ mir_ptr<wchar_t> cid( ::mir_utf8decodeW(data));
- wchar_t *nick = ::db_get_wsa(NULL, this->m_szModuleName, "Nick");
+ mir_ptr<wchar_t> nick( ::db_get_wsa(NULL, this->m_szModuleName, "Nick"));
if (::wcsicmp(nick, L"") == 0)
- {
nick = ::db_get_wsa(NULL, this->m_szModuleName, SKYPE_SETTINGS_LOGIN);
- }
this->SendChatMessage(cid, nick, ::mir_utf8decodeW(text));
-
- ::mir_free(nick);
- ::mir_free(cid);
}
}
|