diff options
-rw-r--r-- | plugins/mTextControl/src/ImageDataObjectHlp.cpp | 1 | ||||
-rw-r--r-- | plugins/mTextControl/src/fancy_rtf.cpp | 6 | ||||
-rw-r--r-- | plugins/mTextControl/src/services.cpp | 1 | ||||
-rw-r--r-- | plugins/mTextControl/src/textusers.h | 2 |
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;
|