From: Gopal Tiwari <gtiwari@redhat.com>
To: linux-bluetooth@vger.kernel.org
Cc: dzickus@redhat.com, gtiwari@redhat.com
Subject: [PATCH BlueZ 2/2] Possible bug fix nsk replaced with sk
Date: Fri, 20 Jul 2018 10:03:59 +0530 [thread overview]
Message-ID: <1532061239-22481-2-git-send-email-gtiwari@redhat.com> (raw)
In-Reply-To: <1532061239-22481-1-git-send-email-gtiwari@redhat.com>
During the review of the code path found this scenario where
seems like nsk is replaced with sk. Where as sk is already free.
Fixing it.
---
tools/rctest.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/rctest.c b/tools/rctest.c
index 6d84e07..909bc68 100644
--- a/tools/rctest.c
+++ b/tools/rctest.c
@@ -376,7 +376,7 @@ static void do_listen(void (*handler)(int sk))
//goto error;
}
- if (priority > 0 && setsockopt(sk, SOL_SOCKET, SO_PRIORITY,
+ if (priority > 0 && setsockopt(nsk, SOL_SOCKET, SO_PRIORITY,
&priority, sizeof(priority)) < 0) {
syslog(LOG_ERR, "Can't set socket priority: %s (%d)",
strerror(errno), errno);
--
2.7.5
next prev parent reply other threads:[~2018-07-20 4:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-20 4:33 [PATCH BlueZ 1/2] Fixing possible use_after_free Gopal Tiwari
2018-07-20 4:33 ` Gopal Tiwari [this message]
2018-07-20 8:24 ` Luiz Augusto von Dentz
2018-07-23 6:28 ` Gopal Tiwari
2018-07-23 8:49 ` Luiz Augusto von Dentz
2018-07-23 9:06 ` Gopal Tiwari
2018-07-23 14:25 ` Don Zickus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1532061239-22481-2-git-send-email-gtiwari@redhat.com \
--to=gtiwari@redhat.com \
--cc=dzickus@redhat.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).