Skip to contentSkip to conversation

trivial scsi_execute_async fix

PATCH New Arne Redlich 1 participant 1 message Sep 30, 2006 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 trivial scsi_execute_async fix

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.

drivers/scsi/scsi_lib.c +1 -1
diff -prauN a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
@@ -424,7 +424,7 @@ int scsi_execute_async(struct scsi_devic
 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);