[vlc-commits] qt: menus: fix memory leak

Alexandre Janniaux git at videolan.org
Sun Jan 3 15:14:47 UTC 2021


vlc | branch: master | Alexandre Janniaux <ajanni at videolabs.io> | Wed Dec 23 11:18:44 2020 +0100| [9ad098b4bd150b107bde84cd4fc4f7a40586de84] | committer: Alexandre Janniaux

qt: menus: fix memory leak

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)

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

 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 c5d4c82db7..af0b0c9eb2 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");



More information about the vlc-commits mailing list