vlc/vlc-3.0 | branch: master | Hugo Beauzée-Luyssen <[email protected]> | 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 <[email protected]>

> 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 )

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to