summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-10-08 15:30:54 +0200
committerMichael Stahl <mstahl@redhat.com>2014-10-08 15:46:06 +0200
commit6edebc078c527112e15c75f2666653e5f53dc171 (patch)
tree2a5c58180ff6343630d025b66d51123d92a30cb4
parentfca62934f492125ea6728fd6d09f0c66c9e4fa69 (diff)
SwPostItMgr::RemoveItem(): AddressSanitizer: heap-use-after-free
Calling std::list::remove() iterates over all elements... Change-Id: I46d00217911c1863f70d3ba72dc7099411714471
-rw-r--r--sw/source/uibase/docvw/PostItMgr.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
index 6b1d5c90f97a..5daecba4624c 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -243,7 +243,7 @@ void SwPostItMgr::RemoveItem( SfxBroadcaster* pBroadcast )
SwSidebarItem* p = (*i);
if (GetActiveSidebarWin() == p->pPostIt)
SetActiveSidebarWin(0);
- mvPostItFlds.remove(*i);
+ mvPostItFlds.erase(i);
delete p->pPostIt;
delete p;
break;