Przeglądaj źródła

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>
Quentin Lambert 8 lat temu
rodzic
commit
1eb08545c0
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1 0
      drivers/scsi/xen-scsifront.c

+ 1 - 0
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;
 	}