[Libreoffice-commits] core.git: include/svx svx/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Sep 8 11:00:19 UTC 2020
include/svx/galleryobjectcollection.hxx | 1 +
svx/source/gallery2/galleryobjectcollection.cxx | 3 +--
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 70094be161b64d1c5f837054508a6b8ad59ed337
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Sep 8 10:29:49 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Sep 8 12:59:36 2020 +0200
cid#1466647 Resource leak
and
cid#1466652 Resource leak
cid#1466655 Resource leak
cid#1466662 Resource leak
Change-Id: I0f1bc254519dd79442493890dfdff3c1f9ce87d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102229
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/svx/galleryobjectcollection.hxx b/include/svx/galleryobjectcollection.hxx
index 8e322549b5eb..a1373a44897a 100644
--- a/include/svx/galleryobjectcollection.hxx
+++ b/include/svx/galleryobjectcollection.hxx
@@ -49,6 +49,7 @@ class SVXCORE_DLLPUBLIC GalleryObjectCollection
{
private:
std::vector<std::unique_ptr<GalleryObject>> m_aObjectList;
+ INetURLObject m_aInvalidURL;
public:
GalleryObjectCollection();
diff --git a/svx/source/gallery2/galleryobjectcollection.cxx b/svx/source/gallery2/galleryobjectcollection.cxx
index c5667eea2dca..4082852ce371 100644
--- a/svx/source/gallery2/galleryobjectcollection.cxx
+++ b/svx/source/gallery2/galleryobjectcollection.cxx
@@ -53,8 +53,7 @@ const INetURLObject& GalleryObjectCollection::getURLForPosition(sal_uInt32 nPos)
{
if (nPos < size())
return get(nPos)->getURL();
- INetURLObject* aInvalidURL = new INetURLObject();
- return *aInvalidURL;
+ return m_aInvalidURL;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list