Skip to content

Commit

Permalink
xen-scsifront: Add a missing call to kfree
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Quentin Lambert authored and Juergen Gross committed Nov 24, 2016
1 parent 30b6b22 commit 1eb0854
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/scsi/xen-scsifront.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 1eb0854

Please sign in to comment.