From: Zefir Kurtisi Date: Wed, 31 Oct 2012 11:22:34 +0000 (+0100) Subject: ath9k: fix memory leak in DFS pattern detector X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=70bf870b54b96887d388286e7d8865406f1aa670;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Signed-off-by: John W. Linville --- 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);