vhost: fix miration during device start
commitd154e0bafbd51bfd029ade9f1362bdff612b0f55
authorMichael S. Tsirkin <mst@redhat.com>
Fri, 16 Jul 2010 14:11:46 +0000 (16 17:11 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 19 Jul 2010 11:20:00 +0000 (19 14:20 +0300)
tree4cd6ee80eb1ebc3212fc98f8e5f604d41c0420bf
parent55e8d1ce6b09300cc5f3adcd9a705156d168381d
vhost: fix miration during device start

We need to know ring layout to allocate log buffer.
So init rings first.

Also fixes a theoretical memory-leak-on-error.

https://bugzilla.redhat.com/show_bug.cgi?id=615228

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Gerd Hoffmann <kraxel@redhat.com>
hw/vhost.c