sd/source/ui/dlg/PhotoAlbumDialog.cxx | 2 +- sd/source/ui/dlg/PhotoAlbumDialog.hxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
New commits: commit 5debf32cf09e865f2b241df3edd8461b92b5c1bf Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Thu Oct 31 19:21:24 2024 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Sun Nov 3 22:51:59 2024 +0100 tdf#163486: PVS: pointer not released in destructor Since commit 7ef3b46fd5bdfb3a87e9b0a840287fdb6ff4734b Author: Gergő Mocsi <gmocs...@gmail.com> Date: Thu Mar 7 11:57:04 2013 +0100 fdo#35546, implementing 'Create Photo Album' function V773 The 'm_pGraphicFilter' pointer was not released in destructor. A memory leak is possible. Change-Id: Iee1c4f4f3ae5232506563a219ffdec61f74fcff0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175884 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx index 51f1b6fa5895..dc7d43378fdf 100644 --- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx +++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx @@ -69,7 +69,7 @@ SdPhotoAlbumDialog::SdPhotoAlbumDialog(weld::Window* pWindow, SdDrawDocument* pA m_xImagesLst->connect_changed(LINK(this, SdPhotoAlbumDialog, SelectHdl)); m_xInsTypeCombo->connect_changed(LINK(this, SdPhotoAlbumDialog, TypeSelectHdl)); - m_pGraphicFilter = new GraphicFilter; + m_pGraphicFilter = std::make_unique<GraphicFilter>(); m_xAddBtn->grab_focus(); } diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.hxx b/sd/source/ui/dlg/PhotoAlbumDialog.hxx index f84ff5cc37df..8da601133c15 100644 --- a/sd/source/ui/dlg/PhotoAlbumDialog.hxx +++ b/sd/source/ui/dlg/PhotoAlbumDialog.hxx @@ -38,7 +38,7 @@ public: private: SdDrawDocument* m_pDoc; - GraphicFilter* m_pGraphicFilter; + std::unique_ptr<GraphicFilter> m_pGraphicFilter; GraphCtrl m_aImg;