summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2022-10-10 12:02:56 +0000
committerPhilip Withnall <philip@tecnocode.co.uk>2022-10-10 12:02:56 +0000
commit1d2ea6518c688e37d7b73bc4c437787b0d6160b1 (patch)
treef5127b065af743c769a7e9eab305ac29054762a3
parentb321ba1d1fe44851c9a6f06ab8c0d39c94ae6a44 (diff)
parentc8e2d4a38dc36c44e7daec8056538dd35ee3c9c1 (diff)
downloadglib-1d2ea6518c688e37d7b73bc4c437787b0d6160b1.tar.gz
Merge branch 'fix-unix-streams-error-leak' into 'main'
tests/unix-streams: Free the cancelled error on cancelled cancellable See merge request GNOME/glib!2892
-rw-r--r--gio/tests/unix-streams.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gio/tests/unix-streams.c b/gio/tests/unix-streams.c
index 407a67dbd..e32e2861d 100644
--- a/gio/tests/unix-streams.c
+++ b/gio/tests/unix-streams.c
@@ -146,7 +146,9 @@ main_thread_skipped (GObject *source, GAsyncResult *res, gpointer user_data)
if (g_cancellable_is_cancelled (main_cancel))
{
+ g_assert_error (err, G_IO_ERROR, G_IO_ERROR_CANCELLED);
do_main_cancel (out);
+ g_clear_error (&err);
return;
}
@@ -180,6 +182,7 @@ main_thread_read (GObject *source, GAsyncResult *res, gpointer user_data)
if (g_cancellable_is_cancelled (main_cancel))
{
+ g_assert_error (err, G_IO_ERROR, G_IO_ERROR_CANCELLED);
do_main_cancel (out);
g_clear_error (&err);
return;
@@ -217,6 +220,7 @@ main_thread_wrote (GObject *source, GAsyncResult *res, gpointer user_data)
if (g_cancellable_is_cancelled (main_cancel))
{
+ g_assert_error (err, G_IO_ERROR, G_IO_ERROR_CANCELLED);
do_main_cancel (out);
g_clear_error (&err);
return;