diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-10-31 19:21:24 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-11-03 22:51:59 +0100 |
commit | 5debf32cf09e865f2b241df3edd8461b92b5c1bf (patch) | |
tree | e4ca33d985c733098b9792309049413fc78ab279 /sd/source | |
parent | e04742c0a55f0361bf9bae19c65fe21a3099e60a (diff) |
tdf#163486: PVS: pointer not released in destructor
Since
commit 7ef3b46fd5bdfb3a87e9b0a840287fdb6ff4734b
Author: Gergő Mocsi <gmocsi91@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.kaganski@collabora.com>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/ui/dlg/PhotoAlbumDialog.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/dlg/PhotoAlbumDialog.hxx | 2 |
2 files changed, 2 insertions, 2 deletions
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; |