summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k
diff options
context:
space:
mode:
authorZefir Kurtisi <zefir.kurtisi@neratec.com>2012-10-31 12:22:34 +0100
committerJohn W. Linville <linville@tuxdriver.com>2012-11-14 14:55:33 -0500
commit70bf870b54b96887d388286e7d8865406f1aa670 (patch)
treeea783dbb0493162995b6834b5a8bdf87cb6b5f05 /drivers/net/wireless/ath/ath9k
parent259bcf87fb51fb80185cf54fac7f00da56a80ac4 (diff)
downloadlinux-70bf870b54b96887d388286e7d8865406f1aa670.tar.bz2
ath9k: fix memory leak in DFS pattern detector
Free instance of pattern detector if requested DFS domain is not supported. Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k')
-rw-r--r--drivers/net/wireless/ath/ath9k/dfs_pattern_detector.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/dfs_pattern_detector.c b/drivers/net/wireless/ath/ath9k/dfs_pattern_detector.c
index f66da35d57ad..3b129143653f 100644
--- a/drivers/net/wireless/ath/ath9k/dfs_pattern_detector.c
+++ b/drivers/net/wireless/ath/ath9k/dfs_pattern_detector.c
@@ -295,6 +295,7 @@ dfs_pattern_detector_init(enum nl80211_dfs_regions region)
return dpd;
pr_err("Could not set DFS domain to %d. ", region);
+ kfree(dpd);
return NULL;
}
EXPORT_SYMBOL(dfs_pattern_detector_init);