From cff8db262dc4b395131a62ea52910042a8caa966 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 14 Oct 2012 19:23:05 +0000 Subject: memory allocation fix git-svn-id: http://svn.miranda-ng.org/main/trunk@1937 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/YAPP/src/services.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'plugins/YAPP/src') diff --git a/plugins/YAPP/src/services.cpp b/plugins/YAPP/src/services.cpp index 16c83169f0..05c5beab8a 100644 --- a/plugins/YAPP/src/services.cpp +++ b/plugins/YAPP/src/services.cpp @@ -163,21 +163,18 @@ INT_PTR ChangeTextW(WPARAM wParam, LPARAM lParam) if (IsWindow(hwndPop)) SendMessage(hwndPop, PUM_SETTEXT, 0, (LPARAM)newText); - else - mir_free(newText); return 0; } -INT_PTR ChangeTextA(WPARAM wParam, LPARAM lParam) { +INT_PTR ChangeTextA(WPARAM wParam, LPARAM lParam) +{ HWND hwndPop = (HWND)wParam; char *newText = (char *)lParam; - wchar_t* buff = mir_a2u(newText); + mir_ptr buff( mir_a2u(newText)); StripBBCodesInPlace(buff); if (IsWindow(hwndPop)) SendMessage(hwndPop, PUM_SETTEXT, 0, (LPARAM)buff); - - mir_free(buff); return 0; } -- cgit v1.2.3