summaryrefslogtreecommitdiff
path: root/plugins/BuddyPounce/src/dialog.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-04-14 13:40:54 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-04-14 13:40:54 +0000
commitfbb5d3456c540866ccc249c35b656def0219d8fb (patch)
tree038ed959c17e04650acb26c1e28278c7c49fb687 /plugins/BuddyPounce/src/dialog.cpp
parentc0af4589fb0d1cb2a365a5ebe01c1a1ee4bfee7a (diff)
some minor memleaks fixed
git-svn-id: http://svn.miranda-ng.org/main/trunk@12807 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/BuddyPounce/src/dialog.cpp')
-rw-r--r--plugins/BuddyPounce/src/dialog.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/BuddyPounce/src/dialog.cpp b/plugins/BuddyPounce/src/dialog.cpp
index e9be19366a..64f3400f94 100644
--- a/plugins/BuddyPounce/src/dialog.cpp
+++ b/plugins/BuddyPounce/src/dialog.cpp
@@ -227,12 +227,9 @@ INT_PTR CALLBACK BuddyPounceSimpleDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LP
{
int length = GetWindowTextLength(GetDlgItem(hwnd, IDC_MESSAGE)) + 1;
if (length>1) {
- TCHAR *text = (TCHAR*)mir_alloc(length*sizeof(TCHAR));
- if (!text) {
- msg(TranslateT("Couldn't allocate enough memory"), _T(""));
- break;
- }
+ TCHAR *text = (TCHAR*)_alloca(length*sizeof(TCHAR));
GetDlgItemText(hwnd, IDC_MESSAGE, text, length);
+ db_set_ts(hContact, modname, "PounceMsg", text);
}
else db_unset(hContact, modname, "PounceMsg");
}