|
@@ -315,9 +315,10 @@ static int xen_blkif_disconnect(struct xen_blkif *blkif)
|
|
|
|
|
|
static void xen_blkif_free(struct xen_blkif *blkif)
|
|
|
{
|
|
|
-
|
|
|
- xen_blkif_disconnect(blkif);
|
|
|
+ WARN_ON(xen_blkif_disconnect(blkif));
|
|
|
xen_vbd_free(&blkif->vbd);
|
|
|
+ kfree(blkif->be->mode);
|
|
|
+ kfree(blkif->be);
|
|
|
|
|
|
/* Make sure everything is drained before shutting down */
|
|
|
kmem_cache_free(xen_blkif_cachep, blkif);
|
|
@@ -514,8 +515,6 @@ static int xen_blkbk_remove(struct xenbus_device *dev)
|
|
|
xen_blkif_put(be->blkif);
|
|
|
}
|
|
|
|
|
|
- kfree(be->mode);
|
|
|
- kfree(be);
|
|
|
return 0;
|
|
|
}
|
|
|
|