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:
Daniel Stodden 2010-04-30 22:01:17 +00:00 committed by Jens Axboe
parent 89de1669ac
commit 9897cb5323

View File

@ -1029,6 +1029,9 @@ static void blkfront_closing(struct blkfront_info *info)
blk_cleanup_queue(info->rq);
info->rq = NULL;
put_disk(info->gd);
info->gd = NULL;
out:
if (info->xbdev)
xenbus_frontend_closed(info->xbdev);