unlink the bs from bdrv-list upon bdrv_delete(bs)
(Uri Lublin) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4179 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
66a3cc798e
commit
34c6f05032
9
block.c
9
block.c
@ -452,7 +452,14 @@ void bdrv_close(BlockDriverState *bs)
|
||||
|
||||
void bdrv_delete(BlockDriverState *bs)
|
||||
{
|
||||
/* XXX: remove the driver list */
|
||||
BlockDriverState **pbs;
|
||||
|
||||
pbs = &bdrv_first;
|
||||
while (*pbs != bs && *pbs != NULL)
|
||||
pbs = &(*pbs)->next;
|
||||
if (*pbs == bs)
|
||||
*pbs = bs->next;
|
||||
|
||||
bdrv_close(bs);
|
||||
qemu_free(bs);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user