From patchwork Wed Oct 31 11:22:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zefir Kurtisi X-Patchwork-Id: 1678571 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 27DD93FDDA for ; Wed, 31 Oct 2012 11:24:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422746Ab2JaLYz (ORCPT ); Wed, 31 Oct 2012 07:24:55 -0400 Received: from mail.neratec.com ([80.75.119.105]:54738 "EHLO mail.neratec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965333Ab2JaLWo (ORCPT ); Wed, 31 Oct 2012 07:22:44 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.neratec.com (Postfix) with ESMTP id D28A18B5FAE; Wed, 31 Oct 2012 12:22:37 +0100 (CET) X-Virus-Scanned: amavisd-new at neratec.com Received: from mail.neratec.com ([127.0.0.1]) by localhost (mail.neratec.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tmBJeFLvDUyN; Wed, 31 Oct 2012 12:22:35 +0100 (CET) Received: from CHL500308.neratec.local (CHL500308.neratec.local [192.168.11.104]) by mail.neratec.com (Postfix) with ESMTPSA id 92F6C8B5FAD; Wed, 31 Oct 2012 12:22:35 +0100 (CET) From: Zefir Kurtisi To: linville@tuxdriver.com Cc: ath9k-devel@lists.ath9k.org, linux-wireless@vger.kernel.org, rodrigue@qca.qualcomm.com, Zefir Kurtisi Subject: [PATCH] ath9k: fix memory leak in DFS pattern detector Date: Wed, 31 Oct 2012 12:22:34 +0100 Message-Id: <1351682554-30645-1-git-send-email-zefir.kurtisi@neratec.com> X-Mailer: git-send-email 1.7.4.1 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Free instance of pattern detector if requested DFS domain is not supported. Signed-off-by: Zefir Kurtisi --- .../net/wireless/ath/ath9k/dfs_pattern_detector.c | 1 + 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 f66da35d..3b12914 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);