]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
xen-scsifront: Add a missing call to kfree
authorQuentin Lambert <lambert.quentin@gmail.com>
Sat, 19 Nov 2016 18:22:56 +0000 (19:22 +0100)
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>
Fri, 3 Feb 2017 20:55:29 +0000 (15:55 -0500)
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>
OraBug: 25497392

(cherry picked from commit 1eb08545c0a3a2249ad53e393383cc06163d0d16)
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
drivers/scsi/xen-scsifront.c

index 7e817c64f385135dd8c0a51e08fecbf2ecd3cace..c01316c6c7b131b56057940566c0d4ac72ba06c8 100644 (file)
@@ -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;
        }