diff options
author | George Hazan <george.hazan@gmail.com> | 2015-04-05 12:47:07 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-04-05 12:47:07 +0000 |
commit | 8717c665cc0c324e3732a3350571069d9aecf539 (patch) | |
tree | bea28e690e42a5a687dc872fc489eb844217ad86 /plugins/NewAwaySysMod/src/MsgEventAdded.cpp | |
parent | 61b47480e829441e8411bab1ca88eef4d8882dd3 (diff) |
some useless malloc() calls removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@12607 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NewAwaySysMod/src/MsgEventAdded.cpp')
-rw-r--r-- | plugins/NewAwaySysMod/src/MsgEventAdded.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp index c62d050c75..61a45f0af6 100644 --- a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp +++ b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp @@ -59,7 +59,7 @@ void __cdecl AutoreplyDelayThread(void *_ad) }
int ReplyLen = (ad->Reply.GetLen() + 1) * (sizeof(char)+sizeof(WCHAR));
- PBYTE pBuf = (PBYTE)malloc(ReplyLen);
+ PBYTE pBuf = (PBYTE)_alloca(ReplyLen);
memcpy(pBuf, _T2A(ad->Reply), ad->Reply.GetLen() + 1);
memcpy(pBuf + ad->Reply.GetLen() + 1, ad->Reply, (ad->Reply.GetLen() + 1) * sizeof(WCHAR));
CallContactService(ad->hContact, ServiceExists(CString(szProto) + PSS_MESSAGE "W") ? (PSS_MESSAGE "W") : PSS_MESSAGE, PREF_UNICODE, (LPARAM)pBuf);
@@ -79,7 +79,6 @@ void __cdecl AutoreplyDelayThread(void *_ad) db_event_add(ad->hContact, &dbeo);
}
- free(pBuf);
delete ad;
}
|