commit | 150b9e51ae975ca1fe468c565870fbc4a96e0574 | [log] [tgz] |
---|---|---|
author | Michael S. Tsirkin <mst@redhat.com> | Sun Apr 28 17:12:08 2013 +0300 |
committer | Michael S. Tsirkin <mst@redhat.com> | Wed May 01 10:02:54 2013 +0300 |
tree | c708d0c69807c7ac4eb14e86498536c5ec1c6c82 | |
parent | 061b16cfe3dc7a106dd29b76f6355d84464d126c [diff] |
vhost: fix error handling in RESET_OWNER ioctl 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>