xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xen-scsifront: Add a missing call to kfree
@ 2016-11-19 18:22 Quentin Lambert
  0 siblings, 0 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;
 	}
 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ 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 --
     [not found] <20161119182256.9081-1-lambert.quentin@gmail.com>
2016-11-21  6:01 ` [PATCH] xen-scsifront: Add a missing call to kfree Juergen Gross
2016-11-24  8:24 ` Juergen Gross
     [not found] ` <1320a162-dc36-5833-a746-367134dae5e7@suse.com>
2016-11-22  3:40   ` Martin K. Petersen
     [not found]   ` <yq1twb0yygf.fsf@sermon.lab.mkp.net>
2016-11-22  5:19     ` Juergen Gross
2016-11-25 21:28   ` Dan Carpenter
2016-12-05 20:53   ` Dan Carpenter
     [not found]   ` <20161205205348.GA31465@mwanda>
2016-12-06  5:45     ` Juergen Gross
     [not found]     ` <9aef1d68-4755-e87d-4919-fb8ca4bea4fb@suse.com>
2016-12-06 10:22       ` Dan Carpenter
2016-11-19 18:22 Quentin Lambert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).