]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[SCSI] trivial scsi_execute_async fix
authorArne Redlich <arne.redlich@xiranet.com>
Sat, 30 Sep 2006 13:49:40 +0000 (15:49 +0200)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Sun, 1 Oct 2006 20:06:54 +0000 (15:06 -0500)
In scsi_execute_async()'s error path, a struct scsi_io_context
allocated with kmem_cache_alloc() is kfree()'d. Obviously
kmem_cache_free() should be used instead.

Signed-off-by: Arne Redlich <arne.redlich@xiranet.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/scsi_lib.c

index d6743b959a72b151f1d6ade6d70b6d3b70c44d92..8ada93ae34f7f47a8ed17950f04aaa02d0a893ec 100644 (file)
@@ -424,7 +424,7 @@ int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd,
 free_req:
        blk_put_request(req);
 free_sense:
-       kfree(sioc);
+       kmem_cache_free(scsi_io_context_cache, sioc);
        return DRIVER_ERROR << 24;
 }
 EXPORT_SYMBOL_GPL(scsi_execute_async);