From 1e8c4d2a6e302dde5d8441d5873f4def4f4eb629 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Tue, 18 Mar 2014 09:56:23 -0400 Subject: [PATCH] gio: fix two more g_task_return_error_if_cancelled() leaks https://bugzilla.gnome.org/show_bug.cgi?id=726611 --- gio/gunixmount.c | 5 ++++- gio/gunixvolume.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gio/gunixmount.c b/gio/gunixmount.c index a42614f..2ec8e5c 100644 --- a/gio/gunixmount.c +++ b/gio/gunixmount.c @@ -283,7 +283,10 @@ eject_unmount_do_cb (gpointer user_data) argv = g_task_get_task_data (task); if (g_task_return_error_if_cancelled (task)) - return G_SOURCE_REMOVE; + { + g_object_unref (task); + return G_SOURCE_REMOVE; + } subprocess = g_subprocess_newv (argv, G_SUBPROCESS_FLAGS_STDOUT_SILENCE | G_SUBPROCESS_FLAGS_STDERR_PIPE, &error); g_assert_no_error (error); diff --git a/gio/gunixvolume.c b/gio/gunixvolume.c index 1c12505..981f703 100644 --- a/gio/gunixvolume.c +++ b/gio/gunixvolume.c @@ -309,7 +309,10 @@ eject_mount_do (GVolume *volume, task = g_task_new (volume, cancellable, callback, user_data); if (g_task_return_error_if_cancelled (task)) - return; + { + g_object_unref (task); + return; + } subprocess = g_subprocess_newv (argv, G_SUBPROCESS_FLAGS_STDOUT_SILENCE | G_SUBPROCESS_FLAGS_STDERR_PIPE, &error); g_assert_no_error (error); -- 2.7.4