diff -urN orig/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c patched/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c --- orig/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c 2005-11-13 05:56:26.000000000 +0100 +++ patched/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c 2005-11-14 12:13:04.000000000 +0100 @@ -293,13 +293,14 @@ { unsigned long sectors, sector_size; unsigned int binfo; + int err; if (info->connected == BLKIF_STATE_CONNECTED) return; DPRINTK("blkfront.c:connect:%s.\n", info->xbdev->otherend); - int err = xenbus_gather(NULL, info->xbdev->otherend, + err = xenbus_gather(NULL, info->xbdev->otherend, "sectors", "%lu", §ors, "info", "%u", &binfo, "sector-size", "%lu", §or_size, @@ -349,10 +350,10 @@ static int blkfront_remove(struct xenbus_device *dev) { - DPRINTK("blkfront_remove: %s removed\n", dev->nodename); - struct blkfront_info *info = dev->data; + DPRINTK("blkfront_remove: %s removed\n", dev->nodename); + blkif_free(info); kfree(info);