virtio-blk: Fix use after free in error case
commit908bb9497bcb5543930cc345326afff939a6ffa4
authorKevin Wolf <kwolf@redhat.com>
Wed, 31 Mar 2010 15:46:59 +0000 (31 17:46 +0200)
committerAurelien Jarno <aurelien@aurel32.net>
Sun, 18 Apr 2010 21:55:19 +0000 (18 23:55 +0200)
tree99ceadfe6109161cc034d88ccdc578fbc672cb72
parent5369e3c0b8997210a2558191d8451775f7643683
virtio-blk: Fix use after free in error case

virtio_blk_req_complete frees the request, so we can't access it any more when
calling bdrv_mon_event. Use the pointer that was copied earlier.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
hw/virtio-blk.c