[vlc-commits] qt: actions_manager: Fix potential leak

Hugo Beauzée-Luyssen git at videolan.org
Thu Jan 18 17:27:44 CET 2018


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Jan 18 16:24:59 2018 +0100| [99b33932faf863fe4d5f8ecb54149dbd10895cc2] | committer: Hugo Beauzée-Luyssen

qt: actions_manager: Fix potential leak

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=99b33932faf863fe4d5f8ecb54149dbd10895cc2
---

 modules/gui/qt/actions_manager.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/gui/qt/actions_manager.cpp b/modules/gui/qt/actions_manager.cpp
index fdead9e3bd..89ce44c5fa 100644
--- a/modules/gui/qt/actions_manager.cpp
+++ b/modules/gui/qt/actions_manager.cpp
@@ -261,6 +261,11 @@ void ActionsManager::onRendererItemAdded(vlc_renderer_item_t* p_item)
         VLCMenuBar::rendererMenu->insertAction( firstSeparator, action );
         VLCMenuBar::rendererGroup->addAction(action);
     }
+    else
+    {
+        vlc_renderer_item_release( p_item );
+        delete action;
+    }
 }
 
 void ActionsManager::onRendererItemRemoved( vlc_renderer_item_t* p_item )



More information about the vlc-commits mailing list