diff options
author | Christophe Fergeau <cfergeau@redhat.com> | 2016-07-27 15:27:30 +0200 |
---|---|---|
committer | Victor Toso <victortoso@redhat.com> | 2016-08-03 15:27:27 +0200 |
commit | 377842b94d15929788ae24203d1a37290bee7462 (patch) | |
tree | 38b508386df04918427f6940a48e8cfb53c97041 /tests | |
parent | 66d8e2ee5070a1f1a629f9948d046dea21fb3601 (diff) |
test-file-transfer: Don't leak GError
Acked-by: Victor Toso <victortoso@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/file-transfer.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/file-transfer.c b/tests/file-transfer.c index 4e00e9a..a27b9cf 100644 --- a/tests/file-transfer.c +++ b/tests/file-transfer.c @@ -152,6 +152,7 @@ transfer_cancelled_on_init_async_cb(GObject *obj, GAsyncResult *res, gpointer da info = spice_file_transfer_task_init_task_finish(xfer_task, res, &error); g_assert_error(error, G_IO_ERROR, G_IO_ERROR_CANCELLED); g_assert_null(info); + g_clear_error(&error); transfer_xfer_task_on_finished(NULL, NULL, data); } @@ -208,6 +209,7 @@ transfer_cancelled_read_async_cb(GObject *source_object, count = spice_file_transfer_task_read_finish(xfer_task, res, &buffer, &error); g_assert_error(error, G_IO_ERROR, G_IO_ERROR_CANCELLED); g_assert_cmpint(count, ==, -1); + g_clear_error(&error); transfer_xfer_task_on_finished(NULL, NULL, user_data); } @@ -300,6 +302,7 @@ transfer_agent_cancelled_read_async_cb(GObject *source_object, count = spice_file_transfer_task_read_finish(xfer_task, res, &buffer, &error); g_assert_error(error, SPICE_CLIENT_ERROR, SPICE_CLIENT_ERROR_FAILED); g_assert_cmpint(count, ==, -1); + g_clear_error(&error); transfer_xfer_task_on_finished(NULL, NULL, user_data); } |