Skip to content

Commit

Permalink
blkfront: Fix gendisk leak
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
  • Loading branch information
Daniel Stodden authored and Jens Axboe committed Aug 7, 2010
1 parent 89de166 commit 9897cb5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/block/xen-blkfront.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9897cb5

Please sign in to comment.