> > > +++ b/net/wireless/nl80211.c
> > > @@ -5839,10 +5839,11 @@ static int nl80211_set_reg(struct sk_buff
> > > *skb, struct genl_info *info)
> > >  
> > >   r = set_regdom(rd, REGD_SOURCE_CRDA);
> > >   /* set_regdom took ownership */
> > > - rd = NULL;
> > >  
> > >   bad_reg:
> > >   kfree(rd);
> > > + rd = NULL;
> > To this I can only say: what?
> The patch is bad, but the confusion starts with the original code
> (ab)using kfree() behaviour by setting rd to NULL. Personally, I do
> not like it, but prefer it over bugs ;-)
> 

Yeah, fair enough. I'll make the following patch:

-       r = set_regdom(rd, REGD_SOURCE_CRDA);
-       /* set_regdom took ownership */
-       rd = NULL;
+       /* set_regdom takes ownership of rd */
+       return set_regdom(rd, REGD_SOURCE_CRDA);

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

Reply via email to