Re: [PATCH] Bluetooth: Fix memory leak in hci_connect_le_scan

From: Marcel Holtmann
Date: Fri Nov 22 2019 - 04:43:30 EST


Hi Navid,

> In the implementation of hci_connect_le_scan() when conn is added via
> hci_conn_add(), if hci_explicit_conn_params_set() fails the allocated
> memory for conn is leaked. Use hci_conn_del() to release it.
>
> Fixes: f75113a26008 ("Bluetooth: add hci_connect_le_scan")
> Signed-off-by: Navid Emamdoost <navid.emamdoost@xxxxxxxxx>
> ---
> net/bluetooth/hci_conn.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel