Search Linux Wireless

Re: [PATCH] cfg80211: fix NULL pointer deference in reg_device_remove()

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

 



Luis R. Rodriguez <lrodriguez@...> writes:

>  void reg_device_remove(struct wiphy *wiphy)
>  {
> -	struct wiphy *request_wiphy;
> +	struct wiphy *request_wiphy = NULL;
I think the assignment of NULL to request_wiphy is not necessary here, since
request_wiphy is set below if last_request != NULL and request_wiphy is only
tested if last_request != NULL. But then again, this function isn't called very
often.
> 
>  	assert_cfg80211_lock();
> 
> -	request_wiphy = wiphy_idx_to_wiphy(last_request->wiphy_idx);
> +	if (last_request)
> +		request_wiphy = wiphy_idx_to_wiphy(last_request->wiphy_idx);
> 
>  	kfree(wiphy->regd);
>  	if (!last_request || !request_wiphy)




--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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