summaryrefslogtreecommitdiffstats
path: root/patches/linux-3.1.10/0075-Fix-unintended-line-swap-that-cause-cause-memory-lea.patch
blob: 9e2c72cf1b9d7754c23a57d4e4f5ef6c5ef85fdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From: popcornmix <popcornmix@gmail.com>
Date: Fri, 22 Jun 2012 12:55:39 +0100
Subject: [PATCH] Fix unintended line swap that cause cause memory leak in USB
 driver

---
 drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c
index 2a3b689..970b065 100644
--- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c
+++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c
@@ -764,8 +764,8 @@ static int urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
 	if(urb->hcpriv != NULL) {
 		dwc_otg_hcd_urb_dequeue(dwc_otg_hcd, (dwc_otg_hcd_urb_t *)urb->hcpriv);
 
-		urb->hcpriv = NULL;
 		dwc_free(urb->hcpriv);
+		urb->hcpriv = NULL;
 	}
 
 	/* Higher layer software sets URB status. */