summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-09-05 17:18:09 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-09-05 22:09:38 +0200
commit875aff18fb58767e909664fb81510a8853ad32c8 (patch)
treea3d6bdbbb3f01ef50ed38533afafdb7b331dbd5f
parentcb549e48a8b8e23a89b608f63d9452e5bec83be7 (diff)
cid#1500657 silence Resource leak
it is pretty ugly stuff though Change-Id: Icf588f44807d136342de6d5425bc41b968fff97f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139445 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--svx/source/svdraw/svdedxv.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 7915e4db5cb9..31e7ab5b9bdf 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -1500,12 +1500,11 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(bool bDontDeleteReally)
mxWeakTextEditObj.clear();
mpTextEditPV = nullptr;
mpTextEditWin = nullptr;
- SdrOutliner* pTEOutliner = mpTextEditOutliner.release();
mpTextEditOutlinerView = nullptr;
pTextEditCursorBuffer = nullptr;
aTextEditArea = tools::Rectangle();
- if (pTEOutliner != nullptr)
+ if (SdrOutliner* pTEOutliner = mpTextEditOutliner.release())
{
bool bModified = pTEOutliner->IsModified();
if (pTEOutlinerView != nullptr)
@@ -1659,6 +1658,7 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(bool bDontDeleteReally)
{
GetMarkedObjectListWriteAccess().SetNameDirty();
}
+ // coverity[leaked_storage] - if pTEOutliner wasn't deleted it didn't really belong to us
}
if (pTEObj && !pTEObj->getSdrModelFromSdrObject().isLocked() && pTEObj->GetBroadcaster())