ath9k: fix memory leak in DFS pattern detector
authorZefir Kurtisi <zefir.kurtisi@neratec.com>
Wed, 31 Oct 2012 11:22:34 +0000 (12:22 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 14 Nov 2012 19:55:33 +0000 (14:55 -0500)
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>
drivers/net/wireless/ath/ath9k/dfs_pattern_detector.c

index f66da35d57ad1ab59d2bbdc6b941c37625c5d91f..3b129143653f8b6ddfc2fd4c037edf8ae7cd28a9 100644 (file)
@@ -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);