From patchwork Tue Feb 9 11:07:41 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roel Kluin X-Patchwork-Id: 78000 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 o19B1LQV027292 for ; Tue, 9 Feb 2010 11:01:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754150Ab0BILAz (ORCPT ); Tue, 9 Feb 2010 06:00:55 -0500 Received: from ey-out-2122.google.com ([74.125.78.25]:26917 "EHLO ey-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754062Ab0BILAy (ORCPT ); Tue, 9 Feb 2010 06:00:54 -0500 Received: by ey-out-2122.google.com with SMTP id d26so1545213eyd.19 for ; Tue, 09 Feb 2010 03:00:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=/IVco6kT96vbUD8r/ogA5MdQrYhixUofJ0BHaDXWVUA=; b=DKs/zAVRlxa3g6dnHGlWJt9HKIzaKoy8IjePmJmk+w05j1o6GZnv7qCUH6Lmo9QkLZ jHgGbxDRUPHBQq0vBzUcInEtb4Q9y8f7FQwuoZp2sUcE6UXFkHENa2Ze4Y3v3Y5erRXa ACY081v3WlrRjIU/yA2Mh4C7Q4S9Celz+0JKY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=q26hvPvsLEUaySurVog3FjvIpOxPHCSRn5kDrWFXiXsGSjbNlnPuFIXaGs87W0k3XV OG7pCLhwnvVGRn12A/8SKQGKIX79f7jPZ2/0lAD/RTNUJpq9kXCeTCU5JhCqeF9cZsae YXXusFszDNAPj+q/cFVS5hGOQPmblFy3iaE4o= Received: by 10.213.109.92 with SMTP id i28mr3809780ebp.63.1265713252880; Tue, 09 Feb 2010 03:00:52 -0800 (PST) Received: from zoinx.mars (d133062.upc-d.chello.nl [213.46.133.62]) by mx.google.com with ESMTPS id 14sm3783716ewy.7.2010.02.09.03.00.51 (version=SSLv3 cipher=RC4-MD5); Tue, 09 Feb 2010 03:00:51 -0800 (PST) Message-ID: <4B7141FD.7050605@gmail.com> Date: Tue, 09 Feb 2010 12:07:41 +0100 From: Roel Kluin User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100120 Fedora/3.0.1-1.fc12 Thunderbird/3.0.1 MIME-Version: 1.0 To: Samuel Ortiz , Zhu Yi , Intel Linux Wireless , linux-wireless@vger.kernel.org, Andrew Morton , LKML Subject: [PATCH] iwmc3200wifi: Test of wrong pointer after kzalloc in iwm_mlme_update_bss_table() 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]); Tue, 09 Feb 2010 11:01:21 +0000 (UTC) diff --git a/drivers/net/wireless/iwmc3200wifi/rx.c b/drivers/net/wireless/iwmc3200wifi/rx.c index 6d6ed74..f727b4a 100644 --- a/drivers/net/wireless/iwmc3200wifi/rx.c +++ b/drivers/net/wireless/iwmc3200wifi/rx.c @@ -794,7 +794,7 @@ static int iwm_mlme_update_bss_table(struct iwm_priv *iwm, u8 *buf, } bss->bss = kzalloc(bss_len, GFP_KERNEL); - if (!bss) { + if (!bss->bss) { kfree(bss); IWM_ERR(iwm, "Couldn't allocate bss\n"); return -ENOMEM;