Message ID | cdfc96e83fb024e1350f3f04d1f3453a7e0b32b6.1405962961.git.jcody@redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/block.c b/block.c index 23f366d..f79efc8 100644 --- a/block.c +++ b/block.c @@ -5385,6 +5385,9 @@ void bdrv_ref(BlockDriverState *bs) * deleted. */ void bdrv_unref(BlockDriverState *bs) { + if (!bs) { + return; + } assert(bs->refcnt > 0); if (--bs->refcnt == 0) { bdrv_delete(bs);