glib r7118 - branches/glib-2-16/gio



Author: matthiasc
Date: Tue Jul  1 02:37:29 2008
New Revision: 7118
URL: http://svn.gnome.org/viewvc/glib?rev=7118&view=rev

Log:
        * gfile.c (g_file_replace_contents): do not leak the output stream.


Modified:
   branches/glib-2-16/gio/ChangeLog
   branches/glib-2-16/gio/gfile.c

Modified: branches/glib-2-16/gio/gfile.c
==============================================================================
--- branches/glib-2-16/gio/gfile.c	(original)
+++ branches/glib-2-16/gio/gfile.c	Tue Jul  1 02:37:29 2008
@@ -5399,6 +5399,7 @@
     {
       /* Ignore errors on close */
       g_output_stream_close (G_OUTPUT_STREAM (out), cancellable, NULL);
+      g_object_unref (out);
       
       /* error is set already */
       return FALSE;
@@ -5410,6 +5411,8 @@
   if (new_etag)
     *new_etag = g_file_output_stream_get_etag (out);
   
+  g_object_unref (out);
+
   return TRUE;
 }
 



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