summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-10-02 16:45:20 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-10-02 16:45:20 +0000
commit9e7a30c3de81bcb4b20fa8717c32775ccc49dea7 (patch)
treee77cc328f87f6af666f3a85e67b09e54f046a4ce
parent2ccd7108b3ff10562a47fea28285bccef7b0fddc (diff)
MirOTR: coverity fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@15492 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/MirOTR/src/dialogs.cpp2
-rw-r--r--plugins/MirOTR/src/utils.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/plugins/MirOTR/src/dialogs.cpp b/plugins/MirOTR/src/dialogs.cpp
index b9b14c92c8..f2401f10d7 100644
--- a/plugins/MirOTR/src/dialogs.cpp
+++ b/plugins/MirOTR/src/dialogs.cpp
@@ -435,7 +435,7 @@ INT_PTR CALLBACK DlgProcSMPInitProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
TCHAR *answer = new TCHAR[len + 1];
GetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD2, answer, len + 1);
T2Utf ans(answer);
- delete answer;
+ delete[] answer;
SMPInitUpdateDialog(context, false);
otr_start_smp(context, quest, (const unsigned char*)ans, mir_strlen(ans));
diff --git a/plugins/MirOTR/src/utils.cpp b/plugins/MirOTR/src/utils.cpp
index a624520afd..f61738deeb 100644
--- a/plugins/MirOTR/src/utils.cpp
+++ b/plugins/MirOTR/src/utils.cpp
@@ -207,15 +207,15 @@ void ShowWarning(TCHAR *msg) {
mir_sntprintf(buffer, _T("%s Warning"), _T(MODULENAME));
- TCHAR *message;
+
switch(disp) {
case ED_POP:
{
int size = int(mir_tstrlen(msg) + 515);
- message = new TCHAR[size]; // newline and null terminator
+ TCHAR *message = new TCHAR[size]; // newline and null terminator
mir_sntprintf(message, size, _T("%s\r\n%s"), buffer, msg);
PUShowMessageT(message, SM_WARNING);
- delete message;
+ delete[] message;
}
break;
case ED_MB: