Message ID | 20190924075947.33954-18-vicamo.yang@canonical.com |
---|---|
State | New |
Headers | show
Return-Path: <kernel-team-bounces@lists.ubuntu.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46ctvT29q1z9sP7; Tue, 24 Sep 2019 18:02:13 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from <kernel-team-bounces@lists.ubuntu.com>) id 1iCflv-0000Zk-UL; Tue, 24 Sep 2019 08:02:07 +0000 Received: from mail-pf1-f195.google.com ([209.85.210.195]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from <vicamo@gmail.com>) id 1iCflX-0008WE-7q for kernel-team@lists.ubuntu.com; Tue, 24 Sep 2019 08:01:43 +0000 Received: by mail-pf1-f195.google.com with SMTP id 205so836698pfw.2 for <kernel-team@lists.ubuntu.com>; Tue, 24 Sep 2019 01:01:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=X1BDO1/OM3C+inSrk0Oy8FTN9sGB/M3bB9WEjylCMfA=; b=QKKYgonGWynwhWUYS6q/oWZZbiiz+D8f0sz8mo9lyyOkda1RUNyqai78//dVZX1T6L XY//w3Ynxx8Ayc6z0pV5ENEEQLrgikeoUyrFwS4JJS53aY9uBlhoDUY2DRCJxiPFAwti DqeIDEAuOsLNAMnTnsoLRT7toeLCmqx8M7u9Qa2sk+3gWn0z49IveW9HHnHsgypPEHVR h7b+Se2ZeuLyQLBPehxZ4JITaBWvTHutSpn67Y9uk+BhJ5JetN5lGZKA5d6oSAAt3ryd 8PLORMCbAHGF5iqVbe7Ai4yDoZYNDHh4mEOzl4mOkW2W9oaUTJXi/nvVB9o6BT6zsaWw 9z1w== X-Gm-Message-State: APjAAAU4ZY0TeRnBDjSsrtrl/17TJH7BJ4v8i9YQyNS8VAOSm7OOA07k 3Pe2tecXLGwRWLDfWh5mC8iY5Yfv X-Google-Smtp-Source: APXvYqwY/FbprxjsTVxbyrS86tqCoWdASj8P8UlOEt6YMyA3KsY11mgozOZh2bk90OEsX0mfv0wWtw== X-Received: by 2002:a65:6254:: with SMTP id q20mr1883825pgv.423.1569312100545; Tue, 24 Sep 2019 01:01:40 -0700 (PDT) Received: from localhost.localdomain (61-220-137-37.HINET-IP.hinet.net. [61.220.137.37]) by smtp.gmail.com with ESMTPSA id g202sm1359780pfb.155.2019.09.24.01.01.31 for <kernel-team@lists.ubuntu.com> (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 24 Sep 2019 01:01:40 -0700 (PDT) From: You-Sheng Yang <vicamo.yang@canonical.com> To: kernel-team@lists.ubuntu.com Subject: [PATCH 17/21][SRU][OEM-OSP1-B] cfg80211: fix memory leak of new_ie Date: Tue, 24 Sep 2019 15:59:43 +0800 Message-Id: <20190924075947.33954-18-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190924075947.33954-1-vicamo.yang@canonical.com> References: <20190924075947.33954-1-vicamo.yang@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions <kernel-team.lists.ubuntu.com> List-Unsubscribe: <https://lists.ubuntu.com/mailman/options/kernel-team>, <mailto:kernel-team-request@lists.ubuntu.com?subject=unsubscribe> List-Archive: <https://lists.ubuntu.com/archives/kernel-team> List-Post: <mailto:kernel-team@lists.ubuntu.com> List-Help: <mailto:kernel-team-request@lists.ubuntu.com?subject=help> List-Subscribe: <https://lists.ubuntu.com/mailman/listinfo/kernel-team>, <mailto:kernel-team-request@lists.ubuntu.com?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" <kernel-team-bounces@lists.ubuntu.com> |
Series |
iwlwifi: mvm: support HE context cmd API change
|
expand
|
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index 46ecb10e85fb4..287518c6caa40 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@ -1576,10 +1576,8 @@ cfg80211_update_notlisted_nontrans(struct wiphy *wiphy, if (!new_ie) return; new_ies = kzalloc(sizeof(*new_ies) + new_ie_len, gfp); - if (!new_ies) { - kfree(new_ie); - return; - } + if (!new_ies) + goto out_free; pos = new_ie; @@ -1613,6 +1611,9 @@ cfg80211_update_notlisted_nontrans(struct wiphy *wiphy, if (old) kfree_rcu((struct cfg80211_bss_ies *)old, rcu_head); } + +out_free: + kfree(new_ie); } /* cfg80211_inform_bss_width_frame helper */