From: Quentin Lambert Date: Sat, 19 Nov 2016 18:22:56 +0000 (+0100) Subject: xen-scsifront: Add a missing call to kfree X-Git-Tag: v4.1.12-102.0.20170601_1400~213^2~24^2~16 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=0b0cd699bf95b8eec74f5161a784499c25c0b588;p=users%2Fjedix%2Flinux-maple.git 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 Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross OraBug: 25497392 (cherry picked from commit 1eb08545c0a3a2249ad53e393383cc06163d0d16) Signed-off-by: Boris Ostrovsky --- diff --git a/drivers/scsi/xen-scsifront.c b/drivers/scsi/xen-scsifront.c index 7e817c64f3851..c01316c6c7b13 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; }