Skip to content

Commit

Permalink
cfg80211: free rd on unlikely event on 11d hint
Browse files Browse the repository at this point in the history
This was never happening but it was still wrong, so correct it.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Feb 27, 2009
1 parent 915278e commit 0441d6f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1341,7 +1341,7 @@ void regulatory_hint_11d(struct wiphy *wiphy,
* it as it would indicate a mistake in the current design
*/
if (WARN_ON(reg_same_country_ie_hint(wiphy, checksum)))
goto out;
goto free_rd_out;

/* We keep this around for when CRDA comes back with a response so
* we can intersect with that */
Expand All @@ -1350,6 +1350,10 @@ void regulatory_hint_11d(struct wiphy *wiphy,
__regulatory_hint(wiphy, REGDOM_SET_BY_COUNTRY_IE,
country_ie_regdomain->alpha2, checksum, env);

goto out;

free_rd_out:
kfree(rd);
out:
mutex_unlock(&cfg80211_mutex);
}
Expand Down

0 comments on commit 0441d6f

Please sign in to comment.