io: remove mistaken call to object_ref on QTask
commit510531ea442a02048b1837fcf574d03559b38c9e
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 7 Jun 2016 11:27:51 +0000 (7 12:27 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Fri, 5 Aug 2016 18:44:29 +0000 (5 13:44 -0500)
tree4a35e5aa70d398e7355f4602f2f313c5e37f30a1
parentd59d37dea4fa8ae716409a828f5ba117ce597da6
io: remove mistaken call to object_ref on QTask

The QTask struct is just a standalone struct, not a QOM Object,
so calling object_ref() on it is not appropriate. This results
in mangling the 'destroy' field in the QTask struct, causing
the later call to qtask_free() to try to call the function
at address 0x1, with predictably segfault happy results.

There is in fact no need for ref counting with QTask, as the
call to qtask_abort() or qtask_complete() will automatically
free associated memory.

This fixes the crash shown in

  https://bugs.launchpad.net/qemu/+bug/1589923

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
(cherry picked from commit bc35d51077b33e68a0ab10a057f352747214223f)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
io/channel-websock.c