From 9897cb532382f075b337f7933b5a50f0ffc32d35 Mon Sep 17 00:00:00 2001 From: Daniel Stodden Date: Fri, 30 Apr 2010 22:01:17 +0000 Subject: [PATCH] blkfront: Fix gendisk leak Signed-off-by: Daniel Stodden Signed-off-by: Jeremy Fitzhardinge --- drivers/block/xen-blkfront.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 3258ae67ac7a..62d32959095d 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@ -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); -- 2.39.5