Commit 1e8c4d2a authored by Dan Winship's avatar Dan Winship

gio: fix two more g_task_return_error_if_cancelled() leaks

https://bugzilla.gnome.org/show_bug.cgi?id=726611
parent 14872d29
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment