[vlc-commits] commit: dbus: fix memory leaks. ( Rémi Duraffort )

git at videolan.org git at videolan.org
Sun Nov 7 22:49:55 CET 2010


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sun Nov  7 22:44:52 2010 +0100| [9b403140a184a2c85d3595d883d4562a86042b03] | committer: Rémi Duraffort 

dbus: fix memory leaks.

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

 modules/control/dbus/dbus.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/modules/control/dbus/dbus.c b/modules/control/dbus/dbus.c
index 2730dc6..a16d920 100644
--- a/modules/control/dbus/dbus.c
+++ b/modules/control/dbus/dbus.c
@@ -142,6 +142,7 @@ static int Open( vlc_object_t *p_this )
         msg_Err( p_this, "Failed to connect to the D-Bus session daemon: %s",
                 error.message );
         dbus_error_free( &error );
+        free( psz_service_name );
         free( p_sys );
         return VLC_EGENERIC;
     }
@@ -368,7 +369,10 @@ static int AllCallback( vlc_object_t *p_this, const char *psz_var,
         state = (var_GetInteger(p_this, "state") == PAUSE_S) ? 1 : 0;
 
         if( state == p_intf->p_sys->i_playing_state )
+        {
+            free( info );
             goto end;
+        }
 
         p_intf->p_sys->i_playing_state = state;
         info->signal = SIGNAL_STATE;



More information about the vlc-commits mailing list