diff options
author | George Hazan <george.hazan@gmail.com> | 2012-10-14 19:23:05 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-10-14 19:23:05 +0000 |
commit | cff8db262dc4b395131a62ea52910042a8caa966 (patch) | |
tree | 0093b09b559f58bfe446b7d355142135bbb4287a | |
parent | c234e05eaebd86d4c7e2696c48655d625fde3def (diff) |
memory allocation fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@1937 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | plugins/YAPP/src/services.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
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<wchar_t> buff( mir_a2u(newText));
StripBBCodesInPlace(buff);
if (IsWindow(hwndPop))
SendMessage(hwndPop, PUM_SETTEXT, 0, (LPARAM)buff);
-
- mir_free(buff);
return 0;
}
|