On 10 May 2018 11:58:17 CEST, Dedy Lansky <dlan...@codeaurora.org> wrote:
>Hi Toke,
>
>Thanks for taking care of wil6210 part. See comment below.
>
>> @@ -824,7 +824,7 @@ static void wmi_evt_connect(struct wil6210_vif
>*vif, int id, void *d, int len)
>>      struct wireless_dev *wdev = vif_to_wdev(vif);
>>      struct wmi_connect_event *evt = d;
>>      int ch; /* channel number */
>> -    struct station_info sinfo;
>> +    struct station_info *sinfo;
>>      u8 *assoc_req_ie, *assoc_resp_ie;
>>      size_t assoc_req_ielen, assoc_resp_ielen;
>>      /* capinfo(u16) + listen_interval(u16) + IEs */ @@ -940,6 +940,11
>@@ static void wmi_evt_connect(struct wil6210_vif *vif, int id, void
>*d, int len)
>>              vif->bss = NULL;
>>      } else if ((wdev->iftype == NL80211_IFTYPE_AP) ||
>>                 (wdev->iftype == NL80211_IFTYPE_P2P_GO)) {
>> +
>> +            sinfo = kzalloc(sizeof(*sinfo), GFP_KERNEL);
>> +            if (!sinfo)
>> +                    rc = -ENOMEM;
>> +
>>              if (rc) {
>>                      if (disable_ap_sme)
>>                              /* notify new_sta has failed */
>> @@ -947,16 +952,16 @@ static void wmi_evt_connect(struct wil6210_vif
>*vif, int id, void *d, int len)
>>                      goto out;
>
>Need to kfree sinfo here. I suggest instead to move the kzalloc below
>the whole "if (rc)"

Ah, right. And here I thought I was being clever by reusing the rc check.

Note to self: don't try to be clever.

Will fix, thanks :)

-Toke

Reply via email to