Staging: otus: fix memory leak
authord binderman <dcb314@hotmail.com>
Tue, 26 Jan 2010 10:00:25 +0000 (10:00 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 4 Mar 2010 00:42:53 +0000 (16:42 -0800)
Fix memory leak in drivers/staging/otus

Signed-off-by: David Binderman <dcb314@hotmail.com>
drivers/staging/otus/ioctl.c

index ebaedb7..8c47b1a 100644 (file)
@@ -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