From f94f16702b87c3c876096723f8e6ad94d63847aa Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 6 May 2013 16:07:39 +0000 Subject: more mem leaks git-svn-id: http://svn.miranda-ng.org/main/trunk@4593 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Skype/src/skype_dialogs.cpp | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'protocols/Skype/src/skype_dialogs.cpp') diff --git a/protocols/Skype/src/skype_dialogs.cpp b/protocols/Skype/src/skype_dialogs.cpp index 73968b9dc2..5cb21f53a6 100644 --- a/protocols/Skype/src/skype_dialogs.cpp +++ b/protocols/Skype/src/skype_dialogs.cpp @@ -17,27 +17,20 @@ INT_PTR CALLBACK CSkypeProto::SkypeMainOptionsProc(HWND hwnd, UINT message, WPAR SetDlgItemText(hwnd, IDC_SL, sid); } { - char *pwd = ::db_get_sa(NULL, proto->m_szModuleName, SKYPE_SETTINGS_PASSWORD); - + mir_ptr pwd( ::db_get_sa(NULL, proto->m_szModuleName, SKYPE_SETTINGS_PASSWORD)); if (pwd) - { - ::CallService( - MS_DB_CRYPT_DECODESTRING, - ::strlen(pwd), - reinterpret_cast(pwd)); - } + ::CallService(MS_DB_CRYPT_DECODESTRING, ::strlen(pwd), pwd); SetDlgItemTextA(hwnd, IDC_PW, pwd); - ::mir_free(pwd); } { int port = rand() % 10000 + 10000; SetDlgItemInt(hwnd, IDC_PORT, ::db_get_w(NULL, proto->m_szModuleName, "Port", port), FALSE); SendMessage(GetDlgItem(hwnd, IDC_PORT), EM_SETLIMITTEXT, 5, 0); } - { - CheckDlgButton(hwnd, IDC_USE_ALT_PORTS, ::db_get_b(NULL, proto->m_szModuleName, "UseAlternativePorts", 1)); - } + + CheckDlgButton(hwnd, IDC_USE_ALT_PORTS, ::db_get_b(NULL, proto->m_szModuleName, "UseAlternativePorts", 1)); + if (proto->IsOnline()) { SendMessage(GetDlgItem(hwnd, IDC_SL), EM_SETREADONLY, 1, 0); -- cgit v1.2.3