[vlc-devel] commit: Qt4: memory leak ( Rémi Denis-Courmont )

git version control git at videolan.org
Wed Jan 14 18:20:04 CET 2009


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Wed Jan 14 18:51:51 2009 +0200| [a19acf0b99b7a986071e6883d0ac8ce2d3b5b821] | committer: Rémi Denis-Courmont 

Qt4: memory leak

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

 modules/gui/qt4/dialogs_provider.cpp |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp
index aeac114..a193cb2 100644
--- a/modules/gui/qt4/dialogs_provider.cpp
+++ b/modules/gui/qt4/dialogs_provider.cpp
@@ -548,12 +548,9 @@ void DialogsProvider::streamingDialog( QWidget *parent, QString mrl,
 
     if( s->exec() == QDialog::Accepted )
     {
-        msg_Dbg( p_intf, "Sout mrl %s", qta( s->getMrl() ) );
-        /* Just do it */
-        int i_len = strlen( qtu( s->getMrl() ) ) + 10;
-        char *psz_option = (char*)malloc( i_len );
-        snprintf( psz_option, i_len - 1, "%s", qtu( s->getMrl() ) );
+        const char *psz_option = qtu( s->getMrl() );
 
+        msg_Dbg( p_intf, "Sout mrl %s", psz_option );
         playlist_AddExt( THEPL, qtu( mrl ), "Streaming",
                          PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END,
                         -1, &psz_option, 1, true, pl_Unlocked );




More information about the vlc-devel mailing list