summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_dialogs.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-05-06 16:07:39 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-05-06 16:07:39 +0000
commitf94f16702b87c3c876096723f8e6ad94d63847aa (patch)
treeb0cd74c1351429b4748474557aabfd56c2150323 /protocols/Skype/src/skype_dialogs.cpp
parent27d17244cb0af6f8b04e2b6725d504c336dabb07 (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_dialogs.cpp')
-rw-r--r--protocols/Skype/src/skype_dialogs.cpp17
1 files changed, 5 insertions, 12 deletions
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<char> pwd( ::db_get_sa(NULL, proto->m_szModuleName, SKYPE_SETTINGS_PASSWORD));
if (pwd)
- {
- ::CallService(
- MS_DB_CRYPT_DECODESTRING,
- ::strlen(pwd),
- reinterpret_cast<LPARAM>(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);