summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Kellner <gicmo@gnome.org>2008-03-03 13:22:28 +0000
committerChristian Kellner <gicmo@src.gnome.org>2008-03-03 13:22:28 +0000
commit045bf124c397a947c513af70cc4741a593838358 (patch)
tree0dbe1a0bbff1ca8633c690d5d204031e556ae23a
parent201698cd403fdec944b777ddd54610aa9ff50964 (diff)
downloadgvfs-045bf124c397a947c513af70cc4741a593838358.tar.gz
Make sure the g_object_unref call is _before_ the return call. Fixes bug
2008-03-03 Christian Kellner <gicmo@gnome.org> * daemon/gvfsjob.c: (g_vfs_job_try): Make sure the g_object_unref call is _before_ the return call. Fixes bug #519867 svn path=/trunk/; revision=1505
-rw-r--r--ChangeLog6
-rw-r--r--daemon/gvfsjob.c9
2 files changed, 11 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 40d23547..62c12bf9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-03-03 Christian Kellner <gicmo@gnome.org>
+
+ * daemon/gvfsjob.c: (g_vfs_job_try): Make sure the g_object_unref
+ call is _before_ the return call.
+ Fixes bug #519867
+
2008-03-03 Cosimo Cecchi <cosimoc@gnome.org>
* daemon/gvfsbackendtrash.c: (do_mount):
diff --git a/daemon/gvfsjob.c b/daemon/gvfsjob.c
index 25b7b16b..4261dea7 100644
--- a/daemon/gvfsjob.c
+++ b/daemon/gvfsjob.c
@@ -204,18 +204,19 @@ gboolean
g_vfs_job_try (GVfsJob *job)
{
GVfsJobClass *class;
+ gboolean res;
class = G_VFS_JOB_GET_CLASS (job);
- /* Ensure that the job lives durint the whole
+ /* Ensure that the job lives during the whole
* lifetime of the call, as it may disappear when
* we call g_vfs_job_succeed/fail()
*/
g_object_ref (job);
-
- return class->try (job);
-
+ res = class->try (job);
g_object_unref (job);
+
+ return res;
}
void