Skip to contentSkip to conversation

orinoco: Fix memory leak on error in processing hostscan frames.

PATCH In review Pavel Roskin 1 participant 1 message Sep 2, 2005

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 4/8 orinoco: Fix memory leak on error in processing hostscan frames.

diff-tree ca955293cdfd3139e150d3b4fed3922a7eb651fb (from cb289b9f9b2a0f3ae7070a008f22e383b37526ee)

Author: Pavel Roskin <proski-mXXj517/[email protected]>
Date:   Thu Sep 1 19:08:00 2005 -0400

Fix memory leak on error in processing hostscan frames.

drivers/net/wireless/orinoco.c +3 -1
@@ -1284,12 +1284,14 @@ static void __orinoco_ev_info(struct net
 			break;
 
 		/* Read scan data */
 		err = hermes_bap_pread(hw, IRQ_BAP, (void *) buf, len,
 				       infofid, sizeof(info));
-		if (err)
+		if (err) {
+			kfree(buf);
 			break;
+		}
 
 #ifdef ORINOCO_DEBUG
 		{
 			int	i;
 			printk(KERN_DEBUG "Scan result [%02X", buf[0]);
Signature · 10 lines
Regards,
Pavel Roskin



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf