summaryrefslogtreecommitdiff
path: root/plugins/New_GPG/src/messages.cpp
diff options
context:
space:
mode:
authorAlexander Gluzsky <sss123next@list.ru>2013-04-04 09:34:04 +0000
committerAlexander Gluzsky <sss123next@list.ru>2013-04-04 09:34:04 +0000
commit9a58588e9affe4bdc2ce96e10b49a75babbdc24c (patch)
treec2232d1b718e34223c200fbf87e3c2012744becb /plugins/New_GPG/src/messages.cpp
parent716a7321b7a26a8f6cd6709c36c1e833cd0c2e79 (diff)
fixed memory allocation/cleaning
fixed ? menu order git-svn-id: http://svn.miranda-ng.org/main/trunk@4299 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/New_GPG/src/messages.cpp')
-rwxr-xr-xplugins/New_GPG/src/messages.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp
index 262aa2abfa..b9c87a5595 100755
--- a/plugins/New_GPG/src/messages.cpp
+++ b/plugins/New_GPG/src/messages.cpp
@@ -268,7 +268,7 @@ void RecvMsgSvc_func(HANDLE hContact, std::wstring str, char *msg, DWORD flags,
str.insert(0, "Received unencrypted message:\n");
if(bDebugLog)
debuglog<<std::string(time_str()+": info: Failed to decrypt GPG encrypted message.");
- char *tmp = new char [str.length()+1];
+ char *tmp = (char*)mir_alloc(sizeof(char)*(str.length()+1));
strcpy(tmp, str.c_str());
HistoryLog(hContact, db_event(msg, timestamp, 0, dbflags));
BYTE enc = DBGetContactSettingByte(hContact, szGPGModuleName, "GPGEncryption", 0);
@@ -1144,8 +1144,8 @@ static INT_PTR CALLBACK DlgProcKeyPassword(HWND hwndDlg, UINT msg, WPARAM wParam
DBWriteContactSettingTString(NULL, szGPGModuleName, "szKeyPassword", tmp);
}
if(password)
- delete [] password;
- password = new TCHAR [_tcslen(tmp)+1];
+ mir_free(password);
+ password = (TCHAR*)mir_alloc(sizeof(TCHAR)*(_tcslen(tmp)+1));
_tcscpy(password, tmp);
}
mir_free(tmp);