From 9aad44c33929bccd9770af9dc3fca939a37dcfd8 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 11 Jun 2008 14:05:45 +0000 Subject: [PATCH] Don't unref before last use svn path=/trunk/; revision=6997 --- gio/ChangeLog | 4 ++++ gio/gfile.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gio/ChangeLog b/gio/ChangeLog index 7c806c60..db9096c6 100644 --- a/gio/ChangeLog +++ b/gio/ChangeLog @@ -1,3 +1,7 @@ +2008-06-11 Matthias Clasen + + * gfile.c (g_file_replace_contents): Don't unref before the last use. + 2008-06-10 Matthias Clasen Bug 537546 – 'desktop' shortcut in file chooser looks like a generic diff --git a/gio/gfile.c b/gio/gfile.c index a4cbd9b0..3094b9ab 100644 --- a/gio/gfile.c +++ b/gio/gfile.c @@ -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; } -- 2.34.1