[vlc-commits] skins2: fix memory leak

Rémi Duraffort git at videolan.org
Wed Dec 11 19:32:43 CET 2013


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Wed Dec 11 19:32:22 2013 +0100| [8dfb239f0d204859a4e35717d1706723ff014f14] | committer: Rémi Duraffort

skins2: fix memory leak

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

 modules/gui/skins2/src/dialogs.cpp |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/modules/gui/skins2/src/dialogs.cpp b/modules/gui/skins2/src/dialogs.cpp
index d96f1b2..3bda3b9 100644
--- a/modules/gui/skins2/src/dialogs.cpp
+++ b/modules/gui/skins2/src/dialogs.cpp
@@ -332,14 +332,14 @@ void Dialogs::showPopupMenu( bool bShow, int popupType = INTF_DIALOG_POPUPMENU )
 
 void Dialogs::showInteraction( interaction_dialog_t *p_dialog )
 {
-    intf_dialog_args_t *p_arg = (intf_dialog_args_t *)
-                                calloc( 1, sizeof(intf_dialog_args_t) );
-
-    p_arg->p_dialog = p_dialog;
-    p_arg->p_intf = getIntf();
-
     if( m_pProvider && m_pProvider->pf_show_dialog )
     {
+        intf_dialog_args_t *p_arg = (intf_dialog_args_t *)
+                                    calloc( 1, sizeof(intf_dialog_args_t) );
+
+        p_arg->p_dialog = p_dialog;
+        p_arg->p_intf = getIntf();
+
         m_pProvider->pf_show_dialog( m_pProvider, INTF_DIALOG_INTERACTION,
                                      0, p_arg );
     }



More information about the vlc-commits mailing list