[tracker] tracker-extract,flac: Fix several memory handling issues
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-extract,flac: Fix several memory handling issues
- Date: Thu, 17 Feb 2011 16:24:22 +0000 (UTC)
commit da5ab43a7a7f740c72e716fe0c1e82d31d615e0c
Author: Aleksander Morgado <aleksander lanedo com>
Date: Thu Feb 17 17:23:45 2011 +0100
tracker-extract,flac: Fix several memory handling issues
src/tracker-extract/tracker-extract-flac.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-flac.c b/src/tracker-extract/tracker-extract-flac.c
index c0eeffb..ceb0238 100644
--- a/src/tracker-extract/tracker-extract-flac.c
+++ b/src/tracker-extract/tracker-extract-flac.c
@@ -321,7 +321,6 @@ extract_flac (const gchar *uri,
g_free (artist_uri);
add_tuple (metadata, "nmm:musicAlbum", album_uri);
- g_free (album_uri);
tracker_guarantee_title_from_file (metadata, "nie:title", fd.title, uri);
add_tuple (metadata, "nmm:trackNumber", fd.tracknumber);
@@ -371,6 +370,8 @@ extract_flac (const gchar *uri,
g_free (album_disc_uri);
}
+ g_free (album_uri);
+
/* FIXME: Trackgain/Trackpeakgain: commented out in vorbis */
add_tuple (metadata, "nie:comment", fd.comment);
@@ -395,25 +396,26 @@ extract_flac (const gchar *uri,
if (stream) {
tracker_sparql_builder_predicate (metadata, "nfo:sampleRate");
- tracker_sparql_builder_object_int64 (metadata,
+ tracker_sparql_builder_object_int64 (metadata,
stream->data.stream_info.sample_rate);
tracker_sparql_builder_predicate (metadata, "nfo:channels");
- tracker_sparql_builder_object_int64 (metadata,
+ tracker_sparql_builder_object_int64 (metadata,
stream->data.stream_info.channels);
tracker_sparql_builder_predicate (metadata,
"nfo:averageBitrate");
- tracker_sparql_builder_object_int64 (metadata,
+ tracker_sparql_builder_object_int64 (metadata,
stream->data.stream_info.bits_per_sample);
tracker_sparql_builder_predicate (metadata, "nfo:duration");
- tracker_sparql_builder_object_int64 (metadata,
- stream->data.stream_info.total_samples /
+ tracker_sparql_builder_object_int64 (metadata,
+ stream->data.stream_info.total_samples /
stream->data.stream_info.sample_rate);
}
g_free (fd.artist);
+ g_free (fd.album);
g_free (fd.albumartist);
g_free (fd.performer);
g_free (fd.title);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]