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>
* 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 */
__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);
}