[PATCH 2/2] driver_nl80211: handle P2P scans correctly

Johannes Berg johannes
Tue Jul 19 05:03:56 PDT 2011


On Tue, 2011-07-19 at 14:57 +0300, Eliad Peller wrote:

> > +       nla_for_each_nested(nl_band, tb_msg[NL80211_ATTR_WIPHY_BANDS], rem_band)
> > +               num_bands++;
> > +
> > +       if (!rates_known) {
> > +               phy_info->drv->num_bands = num_bands;
> > +               phy_info->drv->rates = os_malloc(num_bands * sizeof(phy_info->drv->rates[0]));
> > +               if (!phy_info->drv->rates)
> > +                       return NL_SKIP;
> > +       }
> > +
> there are missing cleanups for drv->rates (for both success and failure).

Good point, I never free this again, will fix.

johannes




More information about the Hostap mailing list