netdev
[Top] [All Lists]

Re: [PATCH 2.6.10-rc1 15/15] wireless/orinoco: Wireless scanning support

To: Dan Williams <dcbw@xxxxxxxxxx>
Subject: Re: [PATCH 2.6.10-rc1 15/15] wireless/orinoco: Wireless scanning support
From: Francois Romieu <romieu@xxxxxxxxxxxxx>
Date: Tue, 26 Oct 2004 21:33:56 +0200
Cc: netdev@xxxxxxxxxxx, jgarzik@xxxxxxxxxx, hermes@xxxxxxxxxxxxxxxxxxxxx
In-reply-to: <1098818888.9874.6.camel@dcbw.boston.redhat.com>
References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> <1098818888.9874.6.camel@dcbw.boston.redhat.com>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4.1i
[...]
> --- a/drivers/net/wireless/orinoco.c  2004-10-26 13:44:23.281599064 -0400
> +++ b/drivers/net/wireless/orinoco.c  2004-08-17 17:26:31.000000000 -0400
> @@ -1442,6 +1442,80 @@
>              dev->name, s, status);
>  }
>  
> +/* Search scan results for requested BSSID, join it if found */
> +static void orinoco_join_ap(struct net_device *dev)
> +{
> +     struct orinoco_private *priv = netdev_priv(dev);
> +     struct hermes *hw = &priv->hw;
> +     int err;
> +     unsigned long flags;
> +     struct join_req {
> +             u8 bssid[ETH_ALEN];
> +             u16 channel;
> +     } __attribute__ ((packed)) req;
> +     const int atom_len = offsetof(struct prism2_scan_apinfo, atim);
> +     struct prism2_scan_apinfo *atom;
> +     int offset = 4;
> +     int found = 0;
> +     u8 *buf = NULL;
> +     u16 len;
> +
> +     /* Allocate buffer for scan results */
> +     buf = kmalloc(MAX_SCAN_LEN, GFP_KERNEL);
> +     if (!buf)
> +             return;
> +
> +     if (orinoco_lock(priv, &flags) != 0)
> +             return;

Leak.

--
Ueimor

<Prev in Thread] Current Thread [Next in Thread>