summaryrefslogtreecommitdiff
path: root/drivers/scsi/xen-scsifront.c
diff options
context:
space:
mode:
authorQuentin Lambert <lambert.quentin@gmail.com>2016-11-19 21:22:56 +0300
committerJuergen Gross <jgross@suse.com>2016-11-24 11:23:14 +0300
commit1eb08545c0a3a2249ad53e393383cc06163d0d16 (patch)
treed0b8f9e6d5a6429a53c88aab6511e995891fadc6 /drivers/scsi/xen-scsifront.c
parent30b6b22f4e6ebe285ad22657fb3818e03c394bb1 (diff)
downloadlinux-1eb08545c0a3a2249ad53e393383cc06163d0d16.tar.xz
xen-scsifront: Add a missing call to kfree
Most error branches following the call to kmalloc contain a call to kfree. This patch add these calls where they are missing. This issue was found with Hector. Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com> Reviewed-by: Juergen Gross <jgross@suse.com> Signed-off-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to 'drivers/scsi/xen-scsifront.c')
-rw-r--r--drivers/scsi/xen-scsifront.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/xen-scsifront.c b/drivers/scsi/xen-scsifront.c
index 7e817c64f385..c01316c6c7b1 100644
--- a/drivers/scsi/xen-scsifront.c
+++ b/drivers/scsi/xen-scsifront.c
@@ -627,6 +627,7 @@ static int scsifront_action_handler(struct scsi_cmnd *sc, uint8_t act)
if (scsifront_enter(info)) {
spin_unlock_irq(host->host_lock);
+ kfree(shadow);
return FAILED;
}