[tracker] tracker-extract: plug a few leaks
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-extract: plug a few leaks
- Date: Mon, 30 May 2011 15:59:37 +0000 (UTC)
commit f069d9bb756c692fda1675fe07e65eb1e96702e1
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon May 30 17:58:02 2011 +0200
tracker-extract: plug a few leaks
src/tracker-extract/tracker-extract-gstreamer.c | 3 +++
src/tracker-extract/tracker-extract.c | 12 +++++++++++-
2 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-gstreamer.c b/src/tracker-extract/tracker-extract-gstreamer.c
index 2d4ae6c..9ef72b1 100644
--- a/src/tracker-extract/tracker-extract-gstreamer.c
+++ b/src/tracker-extract/tracker-extract-gstreamer.c
@@ -869,6 +869,7 @@ extract_metadata (MetadataExtractor *extractor,
g_free (composer_uri);
g_free (album_uri);
g_free (album_disc_uri);
+ g_free (artist_uri);
add_string_gst_tag (metadata, uri, "nfo:codec", extractor->tagcache, GST_TAG_AUDIO_CODEC);
} else if (extractor->mime == EXTRACT_MIME_GUESS) {
@@ -1268,6 +1269,8 @@ tracker_extract_gstreamer (const gchar *uri,
if (!extractor->pipeline) {
g_warning ("No valid pipeline for uri %s", uri);
+
+ g_list_free (extractor->fsinks);
g_slice_free (MetadataExtractor, extractor);
return;
}
diff --git a/src/tracker-extract/tracker-extract.c b/src/tracker-extract/tracker-extract.c
index 5b050f0..de4b720 100644
--- a/src/tracker-extract/tracker-extract.c
+++ b/src/tracker-extract/tracker-extract.c
@@ -116,6 +116,12 @@ tracker_extract_class_init (TrackerExtractClass *klass)
}
static void
+statistics_data_free (StatisticsData *data)
+{
+ g_slice_free (StatisticsData, data);
+}
+
+static void
tracker_extract_init (TrackerExtract *object)
{
TrackerExtractPrivate *priv;
@@ -125,7 +131,8 @@ tracker_extract_init (TrackerExtract *object)
#endif /* HAVE_STREAMANALYZER */
priv = TRACKER_EXTRACT_GET_PRIVATE (object);
- priv->statistics_data = g_hash_table_new (NULL, NULL);
+ priv->statistics_data = g_hash_table_new_full (NULL, NULL, NULL,
+ (GDestroyNotify) statistics_data_free);
}
static void
@@ -353,6 +360,7 @@ get_file_metadata (TrackerExtract *extract,
g_debug ("Done (%d items)", items);
+ g_free (mime_used);
return TRUE;
} else {
data->failed_count++;
@@ -363,6 +371,8 @@ get_file_metadata (TrackerExtract *extract,
priv->unhandled_count++;
}
+
+ g_free (mime_used);
}
items = tracker_sparql_builder_get_length (statements);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]