From: Johan Hedberg <johan.hedberg@gmail.com>
To: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 04/12] Make title always available in metadata
Date: Thu, 13 Oct 2011 10:44:52 +0300 [thread overview]
Message-ID: <20111013074452.GC8289@fusion.localdomain> (raw)
In-Reply-To: <1318432282-25002-4-git-send-email-lucas.demarchi@profusion.mobi>
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
next prev parent reply other threads:[~2011-10-13 7:44 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-12 15:11 [PATCH 01/12] Add mpris-player to .gitignore Lucas De Marchi
2011-10-12 15:11 ` [PATCH 02/12] Fix typo on doc Lucas De Marchi
2011-10-12 15:11 ` [PATCH 03/12] Don't overwrite metadata when changing track Lucas De Marchi
2011-10-13 7:42 ` Johan Hedberg
2011-10-12 15:11 ` [PATCH 04/12] Make title always available in metadata Lucas De Marchi
2011-10-13 7:44 ` Johan Hedberg [this message]
2011-10-12 15:11 ` [PATCH 05/12] Move debug messages to their correspondent getters Lucas De Marchi
2011-10-12 15:11 ` [PATCH 06/12] AVRCP: Do not list values for unsupported attributes Lucas De Marchi
2011-10-12 15:11 ` [PATCH 07/12] Add callback to list available metadata IDs Lucas De Marchi
2011-10-12 15:11 ` [PATCH 08/12] AVRCP: Return error for invalid " Lucas De Marchi
2011-10-12 15:11 ` [PATCH 09/12] AVRCP: Check if len matches number of IDs Lucas De Marchi
2011-10-12 15:11 ` [PATCH 10/12] AVRCP: Only return available metadata attributes Lucas De Marchi
2011-10-12 15:11 ` [PATCH 11/12] Refactor to share code Lucas De Marchi
2011-10-12 15:11 ` [PATCH 12/12] Improve test/simple-player to allow user interaction Lucas De Marchi
2011-10-13 10:12 ` Johan Hedberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111013074452.GC8289@fusion.localdomain \
--to=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=lucas.demarchi@profusion.mobi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox