summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-05-27 11:15:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-27 12:33:04 +0200
commit0ce42c18e19396e66c70631f8a87072424a5d5c6 (patch)
tree03236c357789feae7b90dcddd651f0f43e7167e2
parent95eb088802562b75f8b299908160145c7e88d763 (diff)
fix leaks in ScAcceptChgDlg
Change-Id: Idaa946f06fdfdc1f908cff02cab542b64066763c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116241 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sc/source/ui/miscdlgs/acredlin.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index c6137a42d1cd..1f8f06e7a451 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -1434,7 +1434,10 @@ void ScAcceptChgDlg::RemoveEntries(sal_uLong nStartAction,sal_uLong nEndAction)
{
nAction = pEntryData->nActionNo;
if (nStartAction <= nAction && nAction <= nEndAction)
+ {
aIdsToRemove.push_back(sId);
+ delete pEntryData;
+ }
}
}
while (rTreeView.iter_next(*xEntry));
@@ -1478,6 +1481,7 @@ void ScAcceptChgDlg::UpdateEntries(const ScChangeTrack* pChgTrack, sal_uLong nSt
if (bRemove)
{
rTreeView.remove(*xEntry);
+ delete pEntryData;
if (!bLastEntry)
bLastEntry = rTreeView.get_iter_first(*xLastEntry);