From patchwork Fri Jan 29 09:49:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 8161451 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1A0A9BEEE5 for ; Fri, 29 Jan 2016 09:50:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4A98720115 for ; Fri, 29 Jan 2016 09:50:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 74381200C1 for ; Fri, 29 Jan 2016 09:49:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752723AbcA2JtP (ORCPT ); Fri, 29 Jan 2016 04:49:15 -0500 Received: from mail-pf0-f179.google.com ([209.85.192.179]:34743 "EHLO mail-pf0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751725AbcA2JtN (ORCPT ); Fri, 29 Jan 2016 04:49:13 -0500 Received: by mail-pf0-f179.google.com with SMTP id o185so34956187pfb.1; Fri, 29 Jan 2016 01:49:12 -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=CmMr6lbXtnnq3TRG/KWzPnEoEHaa/QTwfCXe2isFQy4=; b=dorsnSHgsolHvv/o2Q86VFtrMhQeNOg8boC5Q659c4YkazvqaI8V1Ztf0hZ1ydkYoO orIuGXd9ESH09LM+sUTkqjl9uuvNfsKEQY3Ec7s3/v2FAp6WeNATGMA9ym7Li8aB5VzN FhoZqBifktLZYCWnMBiTYr96zgzE5y3iOMrJzNX9HQCnoxjWhbDrtNPK8EyNT+JrBJlz cLp/u5PC1Ix7rlv4zqHOj7XeiEvKxTg/z5cWiB4SGTJjW5J8jQMWI3bIAba3pOGZMhjc tAFPXiQLQiMAVT+aCo/w82pYYmTnv+KMbWFsvN4oZWZnm0HRsBsA0cEYwZFM75ZHk/sF oXvg== 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=CmMr6lbXtnnq3TRG/KWzPnEoEHaa/QTwfCXe2isFQy4=; b=k9g7WrbYGgVVjthbi3L0fVuUksNiCeZjvcbvSNepGwfeG0g2ao/3tHOOZ0x9Iimkpb spIoBUN1MIpT5MyLA8zHIxx2bnLOF71OguruX/SibTQqPFOBSaDQBLfEeaZ8o5lYa1d6 uZ1WCoA+VWKW+hp7fu9YLaIIC4ceDCeuZnaNOzDb4rLVIGRgwcchMsjfUKVQSVPmp4uW rL38AQHFC6vYXpm31LKjGiaS3AaPRaB6+BavNjdwDenuVAy3CnUlEDgcAl3yauQTr9oz pa4/fBKvidpBILciTi2HljvfgLwooKWo1442ynHeDZE6X43v7HqutJbCW99yg1RcwuK0 xc4w== X-Gm-Message-State: AG10YOThU1Z/8KHjZM5w3Ov6IVHiBTGD0rwejmZEhkBAvLN+HypIPEzRAIbWbtE6ocNXaQ== X-Received: by 10.98.64.132 with SMTP id f4mr7071215pfd.159.1454060952157; Fri, 29 Jan 2016 01:49:12 -0800 (PST) Received: from sudip-pc.vectortproxy.org ([183.82.228.136]) by smtp.gmail.com with ESMTPSA id pu3sm22285453pac.9.2016.01.29.01.49.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Jan 2016 01:49:11 -0800 (PST) From: Sudip Mukherjee To: Johannes Berg , "David S. Miller" Cc: linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Sudip Mukherjee Subject: [PATCH] mac80211: fix memory leak Date: Fri, 29 Jan 2016 15:19:04 +0530 Message-Id: <1454060944-11320-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 On error we jumped to the error label and returned the error code but we missed releasing sinfo. Signed-off-by: Sudip Mukherjee Reviewed-by: Julian Calaby --- net/mac80211/sta_info.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 6c198e6..36e75c4 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c @@ -561,6 +561,7 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU) __cleanup_single_sta(sta); out_err: mutex_unlock(&local->sta_mtx); + kfree(sinfo); rcu_read_lock(); return err; }