Commit db1ba073 authored by Mirsal Ennaime's avatar Mirsal Ennaime

dbus: fix memleaks

parent b0d7c77b
...@@ -971,12 +971,14 @@ PropertiesChangedSignal( intf_thread_t *p_intf, ...@@ -971,12 +971,14 @@ PropertiesChangedSignal( intf_thread_t *p_intf,
dbus_message_iter_close_container( &entry, &variant ); dbus_message_iter_close_container( &entry, &variant );
} }
dbus_message_iter_close_container( &changed_properties, &entry ); dbus_message_iter_close_container( &changed_properties, &entry );
free( ppsz_properties[i] );
} }
dbus_message_iter_close_container( &args, &changed_properties ); dbus_message_iter_close_container( &args, &changed_properties );
dbus_message_iter_open_container( &args, DBUS_TYPE_ARRAY, "s", dbus_message_iter_open_container( &args, DBUS_TYPE_ARRAY, "s",
&invalidated_properties ); &invalidated_properties );
dbus_message_iter_close_container( &args, &invalidated_properties ); dbus_message_iter_close_container( &args, &invalidated_properties );
free( ppsz_properties );
SIGNAL_SEND; SIGNAL_SEND;
} }
......
...@@ -387,12 +387,18 @@ PropertiesChangedSignal( intf_thread_t *p_intf, ...@@ -387,12 +387,18 @@ PropertiesChangedSignal( intf_thread_t *p_intf,
ppsz_properties = vlc_dictionary_all_keys( p_changed_properties ); ppsz_properties = vlc_dictionary_all_keys( p_changed_properties );
for( int i = 0; i < i_properties; i++ ) for( int i = 0; i < i_properties; i++ )
{
if( !strcmp( ppsz_properties[i], "Tracks" ) ) if( !strcmp( ppsz_properties[i], "Tracks" ) )
dbus_message_iter_append_basic( &invalidated_properties, dbus_message_iter_append_basic( &invalidated_properties,
DBUS_TYPE_STRING, DBUS_TYPE_STRING,
&ppsz_properties[i] ); &ppsz_properties[i] );
free( ppsz_properties[i] );
}
dbus_message_iter_close_container( &args, &invalidated_properties ); dbus_message_iter_close_container( &args, &invalidated_properties );
free( ppsz_properties );
SIGNAL_SEND; SIGNAL_SEND;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment