2015-05-29 10:04:19

by Andrei Emeltchenko

[permalink] [raw]
Subject: [PATCHv2] bnep: Fix using uninitialized variable

From: Andrei Emeltchenko <[email protected]>

---
profiles/network/bnep.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/profiles/network/bnep.c b/profiles/network/bnep.c
index 59599e4..9bf0b18 100644
--- a/profiles/network/bnep.c
+++ b/profiles/network/bnep.c
@@ -634,8 +634,11 @@ static int bnep_server_add_legacy(int sk, uint16_t dst, char *bridge,
bnep_del_from_bridge(iface, bridge);
bnep_conndel(addr);
rsp = BNEP_CONN_NOT_ALLOWED;
+ goto reply;
}

+ rsp = BNEP_SUCCESS;
+
reply:
if (bnep_send_ctrl_rsp(sk, BNEP_SETUP_CONN_RSP, rsp) < 0) {
err = -errno;
--
2.1.4



2015-06-01 11:00:39

by Szymon Janc

[permalink] [raw]
Subject: Re: [PATCHv2] bnep: Fix using uninitialized variable

Hi Andrei,

On Friday 29 of May 2015 13:04:19 Andrei Emeltchenko wrote:
> From: Andrei Emeltchenko <[email protected]>
>
> ---
> profiles/network/bnep.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/profiles/network/bnep.c b/profiles/network/bnep.c
> index 59599e4..9bf0b18 100644
> --- a/profiles/network/bnep.c
> +++ b/profiles/network/bnep.c
> @@ -634,8 +634,11 @@ static int bnep_server_add_legacy(int sk, uint16_t dst,
> char *bridge, bnep_del_from_bridge(iface, bridge);
> bnep_conndel(addr);
> rsp = BNEP_CONN_NOT_ALLOWED;
> + goto reply;
> }
>
> + rsp = BNEP_SUCCESS;
> +
> reply:
> if (bnep_send_ctrl_rsp(sk, BNEP_SETUP_CONN_RSP, rsp) < 0) {
> err = -errno;

Patch applied. Thanks.

--
BR
Szymon Janc

2015-06-01 10:11:18

by Andrei Emeltchenko

[permalink] [raw]
Subject: Re: [PATCHv2] bnep: Fix using uninitialized variable

ping

On Fri, May 29, 2015 at 01:04:19PM +0300, Andrei Emeltchenko wrote:
> From: Andrei Emeltchenko <[email protected]>
>
> ---
> profiles/network/bnep.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/profiles/network/bnep.c b/profiles/network/bnep.c
> index 59599e4..9bf0b18 100644
> --- a/profiles/network/bnep.c
> +++ b/profiles/network/bnep.c
> @@ -634,8 +634,11 @@ static int bnep_server_add_legacy(int sk, uint16_t dst, char *bridge,
> bnep_del_from_bridge(iface, bridge);
> bnep_conndel(addr);
> rsp = BNEP_CONN_NOT_ALLOWED;
> + goto reply;
> }
>
> + rsp = BNEP_SUCCESS;
> +
> reply:
> if (bnep_send_ctrl_rsp(sk, BNEP_SETUP_CONN_RSP, rsp) < 0) {
> err = -errno;
> --
> 2.1.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html