From 0441d6ffc705de17d85923264a1b03b71ebfccb8 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Sat, 21 Feb 2009 00:04:29 -0500 Subject: cfg80211: free rd on unlikely event on 11d hint This was never happening but it was still wrong, so correct it. Signed-off-by: Luis R. Rodriguez Signed-off-by: John W. Linville --- net/wireless/reg.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'net/wireless') diff --git a/net/wireless/reg.c b/net/wireless/reg.c index baf50cac6e0a..af762be3f0a1 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -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); } -- cgit v1.2.3