net/virtio: fix dangling pointer on failure