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

Hugo Beauzée-Luyssen git at videolan.org
Fri Jan 19 12:01:28 CET 2018


vlc/vlc-3.0 | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Jan 18 16:24:59 2018 +0100| [856cbce884f7814b69e8fa9e9bd12c6262aa74e1] | committer: Jean-Baptiste Kempf

qt: actions_manager: Fix potential leak

(cherry picked from commit 99b33932faf863fe4d5f8ecb54149dbd10895cc2)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=856cbce884f7814b69e8fa9e9bd12c6262aa74e1
---

 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