blkfront: Fix gendisk leak
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
This commit is contained in:
parent
89de1669ac
commit
9897cb5323
1 changed files with 3 additions and 0 deletions
|
@ -1029,6 +1029,9 @@ static void blkfront_closing(struct blkfront_info *info)
|
||||||
blk_cleanup_queue(info->rq);
|
blk_cleanup_queue(info->rq);
|
||||||
info->rq = NULL;
|
info->rq = NULL;
|
||||||
|
|
||||||
|
put_disk(info->gd);
|
||||||
|
info->gd = NULL;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
if (info->xbdev)
|
if (info->xbdev)
|
||||||
xenbus_frontend_closed(info->xbdev);
|
xenbus_frontend_closed(info->xbdev);
|
||||||
|
|
Loading…
Reference in a new issue