From patchwork Thu Feb 18 12:34:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 8349351 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 50E0D9F399 for ; Thu, 18 Feb 2016 12:35:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 87BDB2038D for ; Thu, 18 Feb 2016 12:35:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9916520386 for ; Thu, 18 Feb 2016 12:35:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1426013AbcBRMet (ORCPT ); Thu, 18 Feb 2016 07:34:49 -0500 Received: from mail-pf0-f176.google.com ([209.85.192.176]:33267 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965632AbcBRMer (ORCPT ); Thu, 18 Feb 2016 07:34:47 -0500 Received: by mail-pf0-f176.google.com with SMTP id q63so30778244pfb.0; Thu, 18 Feb 2016 04:34:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=crSzZEEdgE0rDlO2iBUWvd2jbEB8/A1+tf2C1e99M10=; b=LkGdvN253ze89Hfj08gegyHm5oIpbQBvIeHgqfhc01bYXzmEZIpiGzKVAfo8HDCRRM C211jYL2kfbXngsuLw+tZK5G5zBSN0bqvaQkFP9lqrmW4EQ0XmVHOIA7uzb0Kzfmnzh3 QW5rmt/x5dPV5Xu9W+7b3AQ1G/wyw+ztXP6Fea/R9b9JjQimE56/d1HpWR055Q8/VdYE TaVMtMhDID778/RXSdwK5fnWbOjq25RlTPutus/2ld/XrHbdXvVb1u7TR2cyliveE6vl bKuOPDjWbBZeyej6biZNSCY1Bf45/fioQGrP4uOx8KnRnwJvt5/LE7kSVhPxlUwElU1/ ej+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=crSzZEEdgE0rDlO2iBUWvd2jbEB8/A1+tf2C1e99M10=; b=Q6mKffRkSiPPOY6LN67BRIKPpF1Hg4xLQEcZqYm4xDyRO1Eq7n1Ta4hwrsd4Xntdfx C8JbpuLZNapOXGdJf/OVzvLKCDAiS9yGYs67+krjCxxC16lQHq+wqMP9nidej3Q48RkP GjKcr0dp3E4homlNf/spfbQTCTIoA41Ev9LKD9hqapYHGhZ3JuED+pDrSI/kEpCy9/1K lGaCWqF4QfkhYmpNA142bifChrhLgbD8D4bh9JL196yA3tMJ+vDBmues02dwsyII4Cjb xndliqWOWNFFs9XBVy9fzirG0oAvc/sr+8+SQfbi5tq6u/IN6KyYvVhWE0/5OpWkQUlT Wqpg== X-Gm-Message-State: AG10YOT+aOM2aaqx4KCX86+pt2sSjAnePVIORT6aFbApQ1satF8QGbQJmNgIJOfSiIddDg== X-Received: by 10.98.72.24 with SMTP id v24mr9571272pfa.15.1455798886731; Thu, 18 Feb 2016 04:34:46 -0800 (PST) Received: from sudip-pc.vectortproxy.org ([14.195.230.33]) by smtp.gmail.com with ESMTPSA id r62sm10132269pfr.26.2016.02.18.04.34.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 18 Feb 2016 04:34:46 -0800 (PST) From: Sudip Mukherjee To: Kalle Valo Cc: linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, b43-dev@lists.infradead.org, netdev@vger.kernel.org Subject: [PATCH] b43: fix memory leak Date: Thu, 18 Feb 2016 18:04:36 +0530 Message-Id: <1455798876-32186-1-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Sudip Mukherjee On error we jumped to the label bcma_out and returned the error code but we missed freeing dev. Signed-off-by: Sudip Mukherjee --- drivers/net/wireless/broadcom/b43/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/broadcom/b43/main.c b/drivers/net/wireless/broadcom/b43/main.c index c279211..78f670a 100644 --- a/drivers/net/wireless/broadcom/b43/main.c +++ b/drivers/net/wireless/broadcom/b43/main.c @@ -5671,6 +5671,7 @@ static int b43_bcma_probe(struct bcma_device *core) wl = b43_wireless_init(dev); if (IS_ERR(wl)) { err = PTR_ERR(wl); + kfree(dev); goto bcma_out; }