This patch fixes the unchecked return value. --- profiles/network/bnep.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/profiles/network/bnep.c b/profiles/network/bnep.c index 4dde55786..7e777e29c 100644 --- a/profiles/network/bnep.c +++ b/profiles/network/bnep.c @@ -255,7 +255,11 @@ static gboolean bnep_setup_cb(GIOChannel *chan, GIOCondition cond, memset(&timeo, 0, sizeof(timeo)); timeo.tv_sec = 0; - setsockopt(sk, SOL_SOCKET, SO_RCVTIMEO, &timeo, sizeof(timeo)); + if (setsockopt(sk, SOL_SOCKET, SO_RCVTIMEO, &timeo, + sizeof(timeo)) < 0) { + error("bnep: Set setsockopt failed: %s", strerror(errno)); + goto failed; + }; sk = g_io_channel_unix_get_fd(session->io); if (bnep_connadd(sk, session->src, session->iface) < 0) -- 2.25.4