Search Linux Wireless

Re: [PATCH] mac80211_hwsim: add error check to call to rhashtable_init

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

 



On Tue, May 29, 2018 at 11:17:08AM +0200, Johannes Berg wrote:
> On Tue, 2018-05-29 at 10:14 +0100, Colin King wrote:
> > 
> > @@ -3573,7 +3573,9 @@ static int __init init_mac80211_hwsim(void)
> >  	hwsim_wq = alloc_workqueue("hwsim_wq", 0, 0);
> >  	if (!hwsim_wq)
> >  		return -ENOMEM;
> > -	rhashtable_init(&hwsim_radios_rht, &hwsim_rht_params);
> > +	err = rhashtable_init(&hwsim_radios_rht, &hwsim_rht_params);
> > +	if (err)
> > +		return err;
> 
> That's missing a workqueue free, but I can fix that while applying if
> you prefer.
> 

And we don't free the hashtable on error either.

regards,
dan carpenter




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux