From: Steve Grubb <sgrubb@redhat.com>
To: linux-bluetooth@vger.kernel.org
Subject: [Bluez PATCH 1/6] Fix leak in mesh
Date: Fri, 14 May 2021 09:58:07 -0400 [thread overview]
Message-ID: <20210514095807.62f40ff5@ivy-bridge> (raw)
The dir variable needs to be closed before leaving.
---
mesh/rpl.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/mesh/rpl.c b/mesh/rpl.c
index ac0f6b6f2..c53c6fbfd 100644
--- a/mesh/rpl.c
+++ b/mesh/rpl.c
@@ -143,8 +143,10 @@ static void get_entries(const char *iv_path, struct l_queue *rpl_list)
return;
iv_txt = basename(iv_path);
- if (sscanf(iv_txt, "%08x", &iv_index) != 1)
+ if (sscanf(iv_txt, "%08x", &iv_index) != 1) {
+ closedir(dir);
return;
+ }
memset(seq_txt, 0, sizeof(seq_txt));
--
2.31.1
next reply other threads:[~2021-05-14 13:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-14 13:58 Steve Grubb [this message]
2021-05-14 14:11 ` Fix various memory leaks bluez.test.bot
-- strict thread matches above, loose matches on Subject: below --
2021-05-12 21:35 [Bluez PATCH 1/6] Fix leak in mesh Steve Grubb
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=20210514095807.62f40ff5@ivy-bridge \
--to=sgrubb@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.