Search Linux Wireless

Re: [PATCH] mac80211: Add support for SIOCGIWRATE ioctl to provide rate information

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 02 May 2007 10:28, Larry Finger wrote:
> +static int ieee80211_ioctl_giwrate(struct net_device *dev,
> +				  struct iw_request_info *info,
> +				  struct iw_param *rate, char *extra)
> +{
> +	struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
> +	struct sta_info * sta;
> +	struct ieee80211_sub_if_data * sdata;
> +
> +	sdata = IEEE80211_DEV_TO_SUB_IF(dev);
> +	sta = sta_info_get(local, sdata->u.sta.bssid);
> +	if (!sta)
> +		return -ENODEV;
> +	rate->value = local->oper_hw_mode->rates[sta->txrate].rate * 100000;
> +	return 0;
> +}
> +
Memory leak. You need a sta_info_put.

-Michael Wu

Attachment: pgp3MrYSzCOiA.pgp
Description: PGP signature


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux