From 37edb76041ddaf7a500add3e49108a3106db43a8 Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Thu, 16 Apr 2015 18:32:24 +0000 Subject: Tox: - Fixed memory leaks git-svn-id: http://svn.miranda-ng.org/main/trunk@12869 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_profile.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'protocols/Tox/src/tox_profile.cpp') diff --git a/protocols/Tox/src/tox_profile.cpp b/protocols/Tox/src/tox_profile.cpp index afbf5f577e..2a22f24f90 100644 --- a/protocols/Tox/src/tox_profile.cpp +++ b/protocols/Tox/src/tox_profile.cpp @@ -154,11 +154,12 @@ CToxPasswordEditor::CToxPasswordEditor(CToxProto *proto) : void CToxPasswordEditor::OnOk(CCtrlButton*) { + ptrT tszPassword(password.GetText()); if (savePermanently.Enabled()) - m_proto->setTString("Password", password.GetText()); + m_proto->setTString("Password", tszPassword); if (m_proto->password != NULL) mir_free(m_proto->password); - m_proto->password = mir_utf8encodeW(password.GetText()); + m_proto->password = mir_utf8encodeW(tszPassword); EndDialog(m_hwnd, 1); } -- cgit v1.2.3