public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen-scsifront: Add a missing call to kfree
@ 2016-11-19 18:22 Quentin Lambert
  2016-11-21  6:01 ` Juergen Gross
  2016-11-24  8:24 ` Juergen Gross
  0 siblings, 2 replies; 9+ messages in thread
From: Quentin Lambert @ 2016-11-19 18:22 UTC (permalink / raw)
  To: Juergen Gross, Boris Ostrovsky, David Vrabel,
	James E.J. Bottomley, Martin K. Petersen, xen-devel, linux-scsi,
	linux-kernel, kernel-janitors
  Cc: Quentin Lambert

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>

---
 drivers/scsi/xen-scsifront.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/scsi/xen-scsifront.c
+++ b/drivers/scsi/xen-scsifront.c
@@ -627,6 +627,7 @@ static int scsifront_action_handler(stru
 
 	if (scsifront_enter(info)) {
 		spin_unlock_irq(host->host_lock);
+		kfree(shadow);
 		return FAILED;
 	}
 

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-12-06 10:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-19 18:22 [PATCH] xen-scsifront: Add a missing call to kfree Quentin Lambert
2016-11-21  6:01 ` Juergen Gross
2016-11-22  3:40   ` Martin K. Petersen
2016-11-22  5:19     ` Juergen Gross
2016-11-25 21:28   ` Dan Carpenter
2016-12-05 20:53   ` Dan Carpenter
2016-12-06  5:45     ` Juergen Gross
2016-12-06 10:22       ` Dan Carpenter
2016-11-24  8:24 ` Juergen Gross

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox