summaryrefslogtreecommitdiff
path: root/plugins/mTextControl/src
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-12-30 16:14:17 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-12-30 16:14:17 +0000
commitaf227aa7653dc726c3caf22fbeeebad38e717dd7 (patch)
tree95ab8291843e60a0097a549931e91a3212ec1b9a /plugins/mTextControl/src
parentd16a21debd07dbc9cd8b18f285d12129a4a7ff34 (diff)
mTextControl: coverity warnings fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@15969 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/mTextControl/src')
-rw-r--r--plugins/mTextControl/src/ImageDataObjectHlp.cpp1
-rw-r--r--plugins/mTextControl/src/fancy_rtf.cpp6
-rw-r--r--plugins/mTextControl/src/services.cpp1
-rw-r--r--plugins/mTextControl/src/textusers.h2
4 files changed, 8 insertions, 2 deletions
diff --git a/plugins/mTextControl/src/ImageDataObjectHlp.cpp b/plugins/mTextControl/src/ImageDataObjectHlp.cpp
index b176c20a6e..a7d8ae6a06 100644
--- a/plugins/mTextControl/src/ImageDataObjectHlp.cpp
+++ b/plugins/mTextControl/src/ImageDataObjectHlp.cpp
@@ -149,6 +149,7 @@ bool InsertBitmap(IRichEditOle* pRichEditOle, HENHMETAFILE hEmf)
{
lpLockBytes->Release();
pOleClientSite->Release();
+ pods->Release();
return false;
}
diff --git a/plugins/mTextControl/src/fancy_rtf.cpp b/plugins/mTextControl/src/fancy_rtf.cpp
index faaef95c72..e94ef784af 100644
--- a/plugins/mTextControl/src/fancy_rtf.cpp
+++ b/plugins/mTextControl/src/fancy_rtf.cpp
@@ -145,7 +145,11 @@ void bbCodeParse(IFormattedTextDraw *ftd)
fBBCode = bbCodes + i;
found = true;
- if (fText) delete[] fText;
+ if (fText)
+ {
+ delete[] fText;
+ fText = nullptr;
+ }
if (bbCodes[i].end) {
TEXTRANGE trg;
trg.chrg.cpMin = fte.chrg.cpMin;
diff --git a/plugins/mTextControl/src/services.cpp b/plugins/mTextControl/src/services.cpp
index ed6ff03f3e..affac23e92 100644
--- a/plugins/mTextControl/src/services.cpp
+++ b/plugins/mTextControl/src/services.cpp
@@ -162,6 +162,7 @@ MTI_MTextCreateEx(HANDLE userHandle, void *text, DWORD flags)
if (flags & MTEXT_FLG_WCHAR) result->ftd->putTextW((WCHAR *)text);
else result->ftd->putTextA((char *)text);
MText_InitFormatting1(result);
+ delete result;
return 0;
}
diff --git a/plugins/mTextControl/src/textusers.h b/plugins/mTextControl/src/textusers.h
index c205af851e..28e2fb27d3 100644
--- a/plugins/mTextControl/src/textusers.h
+++ b/plugins/mTextControl/src/textusers.h
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#define MTEXT_GUI_MASK (MTEXT_BIDI_MASK|MTEXT_FANCY_SMILEYS|MTEXT_FANCY_BBCODES|MTEXT_FANCY_MATHMOD)
-struct TextUser
+struct TextUser : public MZeroedObject
{
char *name;
DWORD options;