Re: [PATCH 04/12] Make title always available in metadata

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Lucas,

On Wed, Oct 12, 2011, Lucas De Marchi wrote:
> ---
>  audio/media.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/audio/media.c b/audio/media.c
> index c9fe0f0..56913d5 100644
> --- a/audio/media.c
> +++ b/audio/media.c
> @@ -1438,6 +1438,11 @@ static gboolean parse_player_metadata(struct media_player *mp,
>  	if (g_hash_table_size(track) == 0) {
>  		g_hash_table_unref(track);
>  		track = NULL;
> +	} else if (title == FALSE) {
> +		struct metadata_value *value = g_new(struct metadata_value, 1);
> +
> +		value->type = DBUS_TYPE_STRING;
> +		value->value.str = g_strdup("");
>  	}
>  
>  	if (mp->track != NULL)

This doesn't make any sense. You're allocating a new variable which is
only available inside the "else if" scope, and then doing nothing with
it. Additionally this memory is leaked once you exit the scope.

Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux