[vlc-devel] [PATCH] qt: menus: fix memory leak

Alexandre Janniaux ajanni at videolabs.io
Wed Dec 23 10:18:44 UTC 2020


Indirect leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x7f04fac97f41 in operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cpp:99
    #1 0x7f04e0928773 in VLCMenuBar::PopupMenu(intf_thread_t*, bool) ../../modules/gui/qt/menus/menus.cpp:864
    #2 0x7f04e060c348 in DialogsProvider::sendKey(int) ../../modules/gui/qt/dialogs/dialogs_provider.cpp:814
    #3 0x7f04de8cc4be in QObject::event(QEvent*) (/usr/lib/libQt5Core.so.5+0x2e24be)
    #4 0x7f04df367751 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib/libQt5Widgets.so.5+0x15a751)
---
 modules/gui/qt/menus/menus.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/gui/qt/menus/menus.cpp b/modules/gui/qt/menus/menus.cpp
index 997298fe5a..592fbc103f 100644
--- a/modules/gui/qt/menus/menus.cpp
+++ b/modules/gui/qt/menus/menus.cpp
@@ -861,7 +861,7 @@ QMenu* VLCMenuBar::PopupMenu( intf_thread_t *p_intf, bool show )
             /* Open skin dialog box */
             if (var_Type(p_object, "intf-skins-interactive") & VLC_VAR_ISCOMMAND)
             {
-                QAction* openSkinAction = new QAction(qtr("Open skin..."));
+                QAction* openSkinAction = new QAction(qtr("Open skin..."), menu);
                 openSkinAction->setShortcut( QKeySequence( "Ctrl+Shift+S" ));
                 connect(openSkinAction, &QAction::triggered, [=]() {
                     var_TriggerCallback(p_object, "intf-skins-interactive");
-- 
2.29.2



More information about the vlc-devel mailing list