summaryrefslogtreecommitdiff
path: root/plugins/IEView
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-05-14 20:41:25 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-05-14 20:41:25 +0000
commitac32e14b818582f916d320bb2d0f94068bcf45ed (patch)
tree12ee82c96d1c169ee935826a978c770e36db42a3 /plugins/IEView
parent6b0510d035977680aedde109cbdae0cf4c8f44c9 (diff)
fix for memory leak
git-svn-id: http://svn.miranda-ng.org/main/trunk@13597 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/IEView')
-rw-r--r--plugins/IEView/src/IEView.cpp5
-rw-r--r--plugins/IEView/src/IEView.h10
2 files changed, 8 insertions, 7 deletions
diff --git a/plugins/IEView/src/IEView.cpp b/plugins/IEView/src/IEView.cpp
index e2dbb86833..c21858f8b3 100644
--- a/plugins/IEView/src/IEView.cpp
+++ b/plugins/IEView/src/IEView.cpp
@@ -913,8 +913,9 @@ void IEView::clear(IEVIEWEVENT *event)
void* IEView::getSelection(IEVIEWEVENT *event)
{
- replaceStrT(selectedText, getSelection());
- if (selectedText == NULL || wcslen(selectedText) == 0)
+ mir_free(selectedText);
+ selectedText = getSelection();
+ if (mir_wstrlen(selectedText) == 0)
return NULL;
if (event->dwFlags & IEEF_NO_UNICODE) {
diff --git a/plugins/IEView/src/IEView.h b/plugins/IEView/src/IEView.h
index e2e1cec47d..8c5692c7d5 100644
--- a/plugins/IEView/src/IEView.h
+++ b/plugins/IEView/src/IEView.h
@@ -437,11 +437,11 @@ private:
IEViewSink *sink;
HTMLBuilder *builder;
- WNDPROC mainWndProc, docWndProc, serverWndProc;
- bool getFocus;
- bool clearRequired;
- BSTR selectedText;
- bool isContactSet;
+ WNDPROC mainWndProc, docWndProc, serverWndProc;
+ bool getFocus;
+ bool clearRequired;
+ WCHAR* selectedText;
+ bool isContactSet;
MCONTACT hContact;
// IUnknown