vhost: fix error handling in RESET_OWNER ioctl
authorMichael S. Tsirkin <mst@redhat.com>
Sun, 28 Apr 2013 14:12:08 +0000 (17:12 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 1 May 2013 07:02:54 +0000 (10:02 +0300)
RESET_OWNER ioctl would leave the fd in a bad state if
memory allocation failed: device is stopped
but owner is not reset. Make state changes
after allocating memory, such that a failed
ioctl has no effect.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

No differences found