From 83f05d582cdb837cef1b2c103ebb1e2a00568371 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sun, 24 Feb 2013 16:04:55 +0000 Subject: fixes crashes for work with last proto changes git-svn-id: http://svn.miranda-ng.org/main/trunk@3756 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Skype/src/skype_account.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'protocols/Skype/src/skype_account.cpp') diff --git a/protocols/Skype/src/skype_account.cpp b/protocols/Skype/src/skype_account.cpp index 6002061a6f..e4e2887481 100644 --- a/protocols/Skype/src/skype_account.cpp +++ b/protocols/Skype/src/skype_account.cpp @@ -32,8 +32,11 @@ void CSkypeProto::OnAccountChanged(int prop) if (this->rememberPassword && whyLogout == CAccount::INCORRECT_PASSWORD) { this->rememberPassword = false; - if (this->password) + if (this->password) + { ::mir_free(this->password); + this->password = NULL; + } } } } @@ -81,7 +84,10 @@ bool CSkypeProto::IsOnline() void __cdecl CSkypeProto::SignInAsync(void*) { if ( !this->rememberPassword) + { ::mir_free(this->password); + this->password = NULL; + } else { ::CallService(MS_DB_CRYPT_ENCODESTRING, ::strlen(this->password), LPARAM(this->password)); @@ -109,12 +115,18 @@ bool CSkypeProto::SignIn(int status) if ( !this->rememberPassword) { if (this->password) + { ::mir_free(this->password); + this->password = NULL; + } this->password = ::DBGetString(NULL, this->m_szModuleName, SKYPE_SETTINGS_PASSWORD); if ( !this->password || !::strlen(this->password)) { if (this->password) + { ::mir_free(this->password); + this->password = NULL; + } PasswordRequestBoxParam param(this->login); if ( !this->RequestPassword(param)) { -- cgit v1.2.3