Don't unref before last use
authorMatthias Clasen <matthiasc@src.gnome.org>
Wed, 11 Jun 2008 14:05:45 +0000 (14:05 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Wed, 11 Jun 2008 14:05:45 +0000 (14:05 +0000)
svn path=/trunk/; revision=6997

gio/ChangeLog
gio/gfile.c

index 7c806c6..db9096c 100644 (file)
@@ -1,3 +1,7 @@
+2008-06-11  Matthias Clasen <mclasen@redhat.com>
+
+       * gfile.c (g_file_replace_contents): Don't unref before the last use.
+
 2008-06-10  Matthias Clasen <mclasen@redhat.com>
 
        Bug 537546 – 'desktop' shortcut in file chooser looks like a generic
index a4cbd9b..3094b9a 100644 (file)
@@ -5444,11 +5444,12 @@ g_file_replace_contents (GFile             *file,
     }
   
   ret = g_output_stream_close (G_OUTPUT_STREAM (out), cancellable, error);
-  g_object_unref (out);
 
   if (new_etag)
     *new_etag = g_file_output_stream_get_etag (out);
 
+  g_object_unref (out);
+
   return ret;
 }