[tracker] Bug 622734 - too many open files error / possible file descriptor leak



commit b3956007b50f078ea5386dd0ddd5f3395769b590
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Jun 29 13:49:36 2010 +0200

    Bug 622734 - too many open files error / possible file descriptor leak
    
    Free up resources on GStreamer error.

 src/tracker-extract/tracker-extract-gstreamer.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-gstreamer.c b/src/tracker-extract/tracker-extract-gstreamer.c
index 9470c4c..53f490c 100644
--- a/src/tracker-extract/tracker-extract-gstreamer.c
+++ b/src/tracker-extract/tracker-extract-gstreamer.c
@@ -1208,6 +1208,7 @@ tracker_extract_gstreamer (const gchar *uri,
 
 	if (!extractor->pipeline) {
 		g_warning ("No valid pipeline for uri %s", uri);
+		g_slice_free (MetadataExtractor, extractor);
 		return;
 	}
 
@@ -1216,11 +1217,17 @@ tracker_extract_gstreamer (const gchar *uri,
 	if (use_tagreadbin) {
 		if (!poll_for_ready (extractor, GST_STATE_PLAYING, FALSE, TRUE)) {
 			g_warning ("Error running tagreadbin");
+			gst_object_unref (GST_OBJECT (extractor->pipeline));
+			gst_object_unref (extractor->bus);
+			g_slice_free (MetadataExtractor, extractor);
 			return;
 		}
 	} else {
 		if (!poll_for_ready (extractor, GST_STATE_PAUSED, TRUE, FALSE)) {
 			g_warning ("Error running decodebin");
+			gst_object_unref (GST_OBJECT (extractor->pipeline));
+			gst_object_unref (extractor->bus);
+			g_slice_free (MetadataExtractor, extractor);
 			return;
 		}
 



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