[vlc-commits] dbus: fix memleaks
Mirsal Ennaime
git at videolan.org
Wed Jun 8 21:39:41 CEST 2011
vlc | branch: master | Mirsal Ennaime <mirsal at mirsal.fr> | Wed Jun 8 13:36:28 2011 +0200| [db1ba07392a06a611913c995daf794ff5ede8b4b] | committer: Mirsal Ennaime
dbus: fix memleaks
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=db1ba07392a06a611913c995daf794ff5ede8b4b
---
modules/control/dbus/dbus_player.c | 2 ++
modules/control/dbus/dbus_tracklist.c | 6 ++++++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/modules/control/dbus/dbus_player.c b/modules/control/dbus/dbus_player.c
index de2db5a..9f2d7b2 100644
--- a/modules/control/dbus/dbus_player.c
+++ b/modules/control/dbus/dbus_player.c
@@ -971,12 +971,14 @@ PropertiesChangedSignal( intf_thread_t *p_intf,
dbus_message_iter_close_container( &entry, &variant );
}
dbus_message_iter_close_container( &changed_properties, &entry );
+ free( ppsz_properties[i] );
}
dbus_message_iter_close_container( &args, &changed_properties );
dbus_message_iter_open_container( &args, DBUS_TYPE_ARRAY, "s",
&invalidated_properties );
dbus_message_iter_close_container( &args, &invalidated_properties );
+ free( ppsz_properties );
SIGNAL_SEND;
}
diff --git a/modules/control/dbus/dbus_tracklist.c b/modules/control/dbus/dbus_tracklist.c
index 1cc1c74..fc71d87 100644
--- a/modules/control/dbus/dbus_tracklist.c
+++ b/modules/control/dbus/dbus_tracklist.c
@@ -387,12 +387,18 @@ PropertiesChangedSignal( intf_thread_t *p_intf,
ppsz_properties = vlc_dictionary_all_keys( p_changed_properties );
for( int i = 0; i < i_properties; i++ )
+ {
if( !strcmp( ppsz_properties[i], "Tracks" ) )
dbus_message_iter_append_basic( &invalidated_properties,
DBUS_TYPE_STRING,
&ppsz_properties[i] );
+ free( ppsz_properties[i] );
+ }
+
dbus_message_iter_close_container( &args, &invalidated_properties );
+ free( ppsz_properties );
+
SIGNAL_SEND;
}
More information about the vlc-commits
mailing list