Message ID | 20200107205220.565483847@linuxfoundation.org |
---|---|
State | Superseded |
Headers | show
Return-Path: <SRS0=ddew=24=vger.kernel.org=stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90989C33C9B for <stable@archiver.kernel.org>; Tue, 7 Jan 2020 21:13:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 63B8C2072A for <stable@archiver.kernel.org>; Tue, 7 Jan 2020 21:13:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578431581; bh=CJ9r3J8vA2Z0KxY4AMcc8usw0Wmaqp5e6LI5Hy2xaeE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=DfipLW/sXA7Qh1KHIZPFq87XBanSvRUhUX4bITIAyGRw2SZzL/4Aw2Lei5crOWBgO GXHLIZTFKdK/iqPMh/U+3KDAjAlNNyryvyDjbC2vsagpcJMvbVzGMDcxJ64oE7XgfH xYkXmDE7ziDvQBBcs1+zFeN/VHpxqolSWXGhwpfc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729706AbgAGVM7 (ORCPT <rfc822;stable@archiver.kernel.org>); Tue, 7 Jan 2020 16:12:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:37450 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729989AbgAGVKf (ORCPT <rfc822;stable@vger.kernel.org>); Tue, 7 Jan 2020 16:10:35 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2D02F208C4; Tue, 7 Jan 2020 21:10:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578431434; bh=CJ9r3J8vA2Z0KxY4AMcc8usw0Wmaqp5e6LI5Hy2xaeE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qH9E0M7dx3h3sCgrBXfZlKDO2cfB380tT6GWudA6tj4Kasd0AtnlHgryVA3opPxex m0F8oMoBin914kcxD6jXqbDilopmsH7bHAmkYQmDyRn48awURifirvGbXOzsaCqyex vby60NRV28SXFGxL9Q4wIE8qjqWbzJxgPKjpo+go= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Navid Emamdoost <navid.emamdoost@gmail.com>, Marcel Holtmann <marcel@holtmann.org> Subject: [PATCH 4.14 54/74] Bluetooth: Fix memory leak in hci_connect_le_scan Date: Tue, 7 Jan 2020 21:55:19 +0100 Message-Id: <20200107205220.565483847@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200107205135.369001641@linuxfoundation.org> References: <20200107205135.369001641@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -1054,8 +1054,10 @@ struct hci_conn *hci_connect_le_scan(str if (!conn) return ERR_PTR(-ENOMEM); - if (hci_explicit_conn_params_set(hdev, dst, dst_type) < 0) + if (hci_explicit_conn_params_set(hdev, dst, dst_type) < 0) { + hci_conn_del(conn); return ERR_PTR(-EBUSY); + } conn->state = BT_CONNECT; set_bit(HCI_CONN_SCANNING, &conn->flags);