From patchwork Fri May 14 14:52:37 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 99622 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4EEr8iE027517 for ; Fri, 14 May 2010 14:53:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752646Ab0ENOw5 (ORCPT ); Fri, 14 May 2010 10:52:57 -0400 Received: from mail-ww0-f46.google.com ([74.125.82.46]:48184 "EHLO mail-ww0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752315Ab0ENOw4 (ORCPT ); Fri, 14 May 2010 10:52:56 -0400 Received: by wwi18 with SMTP id 18so600875wwi.19 for ; Fri, 14 May 2010 07:52:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=TayTwb0xjLeNuTHhsfnvJHPNWEFeLfemSqtbgaRJBuE=; b=EtniSRRsKQtrCxsKj5iB3Wi/sOdq0wUSswQxZE3uosWMxLgZsCTNegVyEHS2DLPBUn ExSVcxe6SiC6L7/x0FP/cMOaT1a56RVEAAABsrPMWIme+9hR8Co9EGJgLQhIrsmsUTgm WkP7fICNxYTdo+PyxyM5/RAXcKipJfQFdQVCY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=qzse+FK5onHie2l5/QaWwwrIcmaZNlDZ4Xr5a/KOe0iHd3koTncamahciR17peQdIF ooPaZFEks2x0sHXcAL2y9axmtPIro7G2IB65lLeX3nVmoxJcGbLKElFZEfgW9hb3+to6 +lH0m+fgpEJpFB4FtC+O+EmzH06E+RW7YnoEA= Received: by 10.227.127.129 with SMTP id g1mr1323864wbs.180.1273848775120; Fri, 14 May 2010 07:52:55 -0700 (PDT) Received: from bicker ([205.177.176.130]) by mx.google.com with ESMTPS id h22sm17085358wbh.3.2010.05.14.07.52.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 14 May 2010 07:52:54 -0700 (PDT) Date: Fri, 14 May 2010 16:52:37 +0200 From: Dan Carpenter To: "Luis R. Rodriguez" Cc: Jouni Malinen , Sujith Manoharan , Vasanthakumar Thiagarajan , Senthil Balasubramanian , "John W. Linville" , Ming Lei , linux-wireless@vger.kernel.org, ath9k-devel@venema.h4ckr.net Subject: [patch -next 2/2] ath9k_htc: rare leak in ath9k_hif_usb_alloc_tx_urbs() Message-ID: <20100514145237.GF17487@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 14 May 2010 14:53:08 +0000 (UTC) diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c index 46dc41a..77b3591 100644 --- a/drivers/net/wireless/ath/ath9k/hif_usb.c +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c @@ -607,6 +609,10 @@ static int ath9k_hif_usb_alloc_tx_urbs(struct hif_device_usb *hif_dev) return 0; err: + if (tx_buf) { + kfree(tx_buf->buf); + kfree(tx_buf); + } ath9k_hif_usb_dealloc_tx_urbs(hif_dev); return -ENOMEM; }