public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [Patch 2/2] Staging: winbond: Memory & urb freed
@ 2013-05-31 15:44 Harsh Kumar
  2013-05-31 15:57 ` Dan Carpenter
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Harsh Kumar @ 2013-05-31 15:44 UTC (permalink / raw)
  To: kernel-janitors

Memory & urb should be freed before exiting from the function, I think.

Note: This patch is to be applied after applying the earlier patch i.e [patch 1/2]

Signed-off-by: Harsh Kumar <harsh1kumar@gmail.com>

---
 drivers/staging/winbond/wb35reg.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)

diff -uprN a/drivers/staging/winbond/wb35reg.c b/drivers/staging/winbond/wb35reg.c
--- a/drivers/staging/winbond/wb35reg.c	2013-05-31 20:03:17.000000000 +0530
+++ b/drivers/staging/winbond/wb35reg.c	2013-05-31 20:21:39.856010583 +0530
@@ -69,6 +69,9 @@ unsigned char Wb35Reg_BurstWrite(struct
 	/* Start EP0VM */
 	Wb35Reg_EP0VM_start(pHwData);
 
+	kfree(reg_queue);
+	usb_free_urb(urb);
+
 	return true;
 }
 
@@ -211,6 +214,9 @@ unsigned char Wb35Reg_Write(struct hw_da
 	/* Start EP0VM */
 	Wb35Reg_EP0VM_start(pHwData);
 
+	kfree(reg_queue);
+	usb_free_urb(urb);
+
 	return true;
 }
 
@@ -277,6 +283,9 @@ unsigned char Wb35Reg_WriteWithCallbackV
 	/* Start EP0VM */
 	Wb35Reg_EP0VM_start(pHwData);
 
+	kfree(reg_queue);
+	usb_free_urb(urb);
+
 	return true;
 }
 
@@ -381,6 +390,9 @@ unsigned char Wb35Reg_Read(struct hw_dat
 	/* Start EP0VM */
 	Wb35Reg_EP0VM_start(pHwData);
 
+	kfree(reg_queue);
+	usb_free_urb(urb);
+
 	return true;
 }
 

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

end of thread, other threads:[~2013-05-31 17:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-31 15:44 [Patch 2/2] Staging: winbond: Memory & urb freed Harsh Kumar
2013-05-31 15:57 ` Dan Carpenter
2013-05-31 16:30 ` Harsh Kumar
2013-05-31 16:39 ` Dan Carpenter
2013-05-31 16:46 ` Julia Lawall
2013-05-31 17:12 ` Harsh Kumar

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