OSDN Git Service

io: fix possible double free of task error object
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 25 Jan 2017 11:10:53 +0000 (11:10 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 26 Jan 2017 10:26:18 +0000 (10:26 +0000)
commit80fb34eda099e7cc519a91e9701ab3c0262717b3
tree44fc2cdb60950b04588b6ad65651b353170ae04b
parentc7f1cf01b8245762ca5864e835d84f6677ae8b1f
io: fix possible double free of task error object

If a QIOTask has an error set and the calling code uses
qio_task_propagate_error() to steal the reference to
that Error object, the task would not clear its own
reference. This would lead to a double-free when
qio_task_free runs, if the caller had (correctly) freed
the Error object they now owned.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
io/task.c
tests/test-io-task.c