totem-pl-parser r167 - in trunk: . plparse



Author: hadess
Date: Wed Aug 20 13:18:07 2008
New Revision: 167
URL: http://svn.gnome.org/viewvc/totem-pl-parser?rev=167&view=rev

Log:
2008-08-20  Bastien Nocera  <hadess hadess net>

	* plparse/test-parser.c (test_data_get_data):
	* plparse/totem-pl-parser.c
	(my_g_file_info_get_mime_type_with_data),
	(totem_pl_parser_write_buffer): Really free the resources
	used by the streams by unref'ing them



Modified:
   trunk/ChangeLog
   trunk/plparse/test-parser.c
   trunk/plparse/totem-pl-parser.c

Modified: trunk/plparse/test-parser.c
==============================================================================
--- trunk/plparse/test-parser.c	(original)
+++ trunk/plparse/test-parser.c	Wed Aug 20 13:18:07 2008
@@ -292,7 +292,7 @@
 
 	buffer = g_malloc (MIME_READ_CHUNK_SIZE);
 	bytes_read = g_input_stream_read (G_INPUT_STREAM (stream), buffer, MIME_READ_CHUNK_SIZE, NULL, &error);
-	g_input_stream_close (G_INPUT_STREAM (stream), NULL, NULL);
+	g_object_unref (G_INPUT_STREAM (stream));
 	if (bytes_read == -1) {
 		g_free (buffer);
 		return NULL;

Modified: trunk/plparse/totem-pl-parser.c
==============================================================================
--- trunk/plparse/totem-pl-parser.c	(original)
+++ trunk/plparse/totem-pl-parser.c	Wed Aug 20 13:18:07 2008
@@ -672,7 +672,7 @@
 	/* Read the whole thing, up to MIME_READ_CHUNK_SIZE */
 	buffer = g_malloc (MIME_READ_CHUNK_SIZE);
 	bytes_read = g_input_stream_read (G_INPUT_STREAM (stream), buffer, MIME_READ_CHUNK_SIZE, NULL, &error);
-	g_input_stream_close (G_INPUT_STREAM (stream), NULL, NULL);
+	g_object_unref (G_INPUT_STREAM (stream));
 	if (bytes_read == -1) {
 		g_free (buffer);
 		return NULL;
@@ -777,7 +777,7 @@
 				       buf, len,
 				       &bytes_written,
 				       NULL, error) == FALSE) {
-		g_output_stream_close (stream, NULL, NULL);
+		g_object_unref (stream);
 		return FALSE;
 	}
 



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