Merge remote-tracking branch 'remotes/berrange/tags/pull-qio-2017-01-26-1' into staging

Merge io/ 2017/01/26

# gpg: Signature made Thu 26 Jan 2017 10:26:48 GMT
# gpg:                using RSA key 0xBE86EBB415104FDF
# gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>"
# gpg:                 aka "Daniel P. Berrange <berrange@redhat.com>"
# Primary key fingerprint: DAF3 A6FD B26B 6291 2D0E  8E3F BE86 EBB4 1510 4FDF

* remotes/berrange/tags/pull-qio-2017-01-26-1:
  io: fix possible double free of task error object

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell
2017-01-27 14:08:57 +00:00
2 changed files with 4 additions and 1 deletions

View File

@ -157,6 +157,7 @@ bool qio_task_propagate_error(QIOTask *task,
{
if (task->err) {
error_propagate(errp, task->err);
task->err = NULL;
return true;
}

View File

@ -127,7 +127,7 @@ static void test_task_failure(void)
g_assert(data.source == obj);
g_assert(data.err == err);
g_assert(data.freed == false);
error_free(data.err);
}
@ -238,6 +238,8 @@ static void test_task_thread_failure(void)
g_assert(data.source == obj);
g_assert(data.err != NULL);
error_free(data.err);
self = g_thread_self();
/* Make sure the test_task_thread_worker actually got