cfg80211: free rd on unlikely event on 11d hint
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Sat, 21 Feb 2009 05:04:29 +0000 (00:04 -0500)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 27 Feb 2009 19:52:57 +0000 (14:52 -0500)
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>
net/wireless/reg.c

index baf50cac6e0acfc9abf1bbc905772b0d19d3ee63..af762be3f0a1e1efcfaccc9ba0b874ba0af836a0 100644 (file)
@@ -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 */
@@ -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);
 }