mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-03 09:46:17 +01:00
gio: fix two more g_task_return_error_if_cancelled() leaks
https://bugzilla.gnome.org/show_bug.cgi?id=726611
This commit is contained in:
parent
14872d2929
commit
1e8c4d2a6e
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user