diff --git a/block.c b/block.c index 9549b9eff9f3034fdfae86e239851db459b9c0da..81a82578a21e2c4f7948b40093e09f3301f28336 100644 --- a/block.c +++ b/block.c @@ -730,6 +730,8 @@ void bdrv_detach(BlockDriverState *bs, DeviceState *qdev) { assert(bs->peer == qdev); bs->peer = NULL; + bs->change_cb = NULL; + bs->change_opaque = NULL; } DeviceState *bdrv_get_attached(BlockDriverState *bs)