From b98e8e8bfffc389b2a40ee30925f39252ed42ef6 Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Tue, 26 Jan 2016 20:14:01 +0000 Subject: MirOTR: Fix for a memory allocation conflict introduced in [14690] (fixes #1160) git-svn-id: http://svn.miranda-ng.org/main/trunk@16173 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirOTR/src/otr.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'plugins/MirOTR/src') diff --git a/plugins/MirOTR/src/otr.cpp b/plugins/MirOTR/src/otr.cpp index 728314d726..1c1f476041 100644 --- a/plugins/MirOTR/src/otr.cpp +++ b/plugins/MirOTR/src/otr.cpp @@ -72,7 +72,6 @@ INT_PTR CALLBACK GenKeyDlgBoxProc(HWND hWndDlg, UINT msg, WPARAM wParam, LPARAM case WM_DESTROY: SetClassLongPtr(hWndDlg, GCLP_HICON, 0); IcoLib_Release(ICON_OTR, 1); - mir_free((char*)lParam); } return FALSE; } @@ -105,8 +104,7 @@ extern "C" { void otr_gui_create_privkey(void *opdata, const char *account_name, const char *protocol) { DEBUGOUT_T("OTR_GUI_CREATE_PRIVKEY\n"); if (opdata) { - mir_free((char*)protocol); - protocol = mir_strdup(GetContactProto((UINT_PTR)opdata)); + protocol = GetContactProto((UINT_PTR)opdata); } if (!protocol) return; DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_GENKEYNOTIFY), 0, GenKeyDlgBoxProc, (LPARAM)protocol); -- cgit v1.2.3