Staging: otus: fix memory leak

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Sunday, March 7, 2010 - 6:01 pm

Gitweb:     http://git.kernel.org/linus/e501b36bdf85212d537b30babf60dfedf3fdcebd
Commit:     e501b36bdf85212d537b30babf60dfedf3fdcebd
Parent:     411a861fc4f92cf0f5039928b448dcc7ca31d423
Author:     d binderman <dcb314@hotmail.com>
AuthorDate: Tue Jan 26 10:00:25 2010 +0000
Committer:  Greg Kroah-Hartman <gregkh@suse.de>
CommitDate: Wed Mar 3 16:42:53 2010 -0800

    Staging: otus: fix memory leak
    
    Fix memory leak in drivers/staging/otus
    
    Signed-off-by: David Binderman <dcb314@hotmail.com>
---
 drivers/staging/otus/ioctl.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/otus/ioctl.c b/drivers/staging/otus/ioctl.c
index ebaedb7..8c47b1a 100644
--- a/drivers/staging/otus/ioctl.c
+++ b/drivers/staging/otus/ioctl.c
@@ -866,15 +866,15 @@ int usbdrvwext_giwscan(struct net_device *dev,
 	char *current_ev = extra;
 	char *end_buf;
 	int i;
-	/* struct zsBssList BssList; */
-	struct zsBssListV1 *pBssList = kmalloc(sizeof(struct zsBssListV1),
-								GFP_KERNEL);
 	/* BssList = wd->sta.pBssList; */
 	/* zmw_get_wlan_dev(dev); */
 
 	if (macp->DeviceOpened != 1)
 		return 0;
 
+	/* struct zsBssList BssList; */
+	struct zsBssListV1 *pBssList = kmalloc(sizeof(struct zsBssListV1),
+								GFP_KERNEL);
 	if (data->length == 0)
 		end_buf = extra + IW_SCAN_MAX_DATA;
 	else
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Staging: otus: fix memory leak, Linux Kernel Mailing ..., (Sun Mar 7, 6:01 pm)