linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bluez PATCH 1/6] Fix leak in mesh
@ 2021-05-12 21:35 Steve Grubb
  2021-05-12 23:06 ` Fix various memory leaks bluez.test.bot
  0 siblings, 1 reply; 3+ messages in thread
From: Steve Grubb @ 2021-05-12 21:35 UTC (permalink / raw)
  To: linux-bluetooth



The dir variable needs to be closed before leaving.

Signed-off-by: Steve Grubb <sgrubb@redhat.com>
---
 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: Fix various memory leaks
  2021-05-12 21:35 [Bluez PATCH 1/6] Fix leak in mesh Steve Grubb
@ 2021-05-12 23:06 ` bluez.test.bot
  0 siblings, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2021-05-12 23:06 UTC (permalink / raw)
  To: linux-bluetooth, sgrubb

[-- Attachment #1: Type: text/plain, Size: 3354 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=481531

---Test result---

Test Summary:
CheckPatch                    PASS      1.10 seconds
GitLint                       PASS      0.61 seconds
Prep - Setup ELL              PASS      40.35 seconds
Build - Prep                  PASS      0.10 seconds
Build - Configure             PASS      6.98 seconds
Build - Make                  FAIL      154.20 seconds
Make Check                    FAIL      0.63 seconds
Make Distcheck                PASS      208.68 seconds
Build w/ext ELL - Configure   PASS      7.17 seconds
Build w/ext ELL - Make        FAIL      145.96 seconds

Details
##############################
Test: CheckPatch - PASS
Desc: Run checkpatch.pl script with rule in .checkpatch.conf

##############################
Test: GitLint - PASS
Desc: Run gitlint with rule in .gitlint

##############################
Test: Prep - Setup ELL - PASS
Desc: Clone, build, and install ELL

##############################
Test: Build - Prep - PASS
Desc: Prepare environment for build

##############################
Test: Build - Configure - PASS
Desc: Configure the BlueZ source tree

##############################
Test: Build - Make - FAIL
Desc: Build the BlueZ source tree
Output:
obexd/plugins/filesystem.c: In function ‘capability_open’:
obexd/plugins/filesystem.c:418:18: error: assignment to ‘GString *’ {aka ‘struct _GString *’} from incompatible pointer type ‘char *’ [-Werror=incompatible-pointer-types]
  418 |   object->buffer = buf;
      |                  ^
cc1: all warnings being treated as errors
make[1]: *** [Makefile:7907: obexd/plugins/obexd-filesystem.o] Error 1
make: *** [Makefile:4128: all] Error 2


##############################
Test: Make Check - FAIL
Desc: Run 'make check'
Output:
obexd/plugins/filesystem.c: In function ‘capability_open’:
obexd/plugins/filesystem.c:418:18: error: assignment to ‘GString *’ {aka ‘struct _GString *’} from incompatible pointer type ‘char *’ [-Werror=incompatible-pointer-types]
  418 |   object->buffer = buf;
      |                  ^
cc1: all warnings being treated as errors
make[1]: *** [Makefile:7907: obexd/plugins/obexd-filesystem.o] Error 1
make: *** [Makefile:10398: check] Error 2


##############################
Test: Make Distcheck - PASS
Desc: Run distcheck to check the distribution

##############################
Test: Build w/ext ELL - Configure - PASS
Desc: Configure BlueZ source with '--enable-external-ell' configuration

##############################
Test: Build w/ext ELL - Make - FAIL
Desc: Build BlueZ source with '--enable-external-ell' configuration
Output:
obexd/plugins/filesystem.c: In function ‘capability_open’:
obexd/plugins/filesystem.c:418:18: error: assignment to ‘GString *’ {aka ‘struct _GString *’} from incompatible pointer type ‘char *’ [-Werror=incompatible-pointer-types]
  418 |   object->buffer = buf;
      |                  ^
cc1: all warnings being treated as errors
make[1]: *** [Makefile:7907: obexd/plugins/obexd-filesystem.o] Error 1
make: *** [Makefile:4128: all] Error 2




---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bluez PATCH 1/6] Fix leak in mesh
@ 2021-05-14 13:58 Steve Grubb
  0 siblings, 0 replies; 3+ messages in thread
From: Steve Grubb @ 2021-05-14 13:58 UTC (permalink / raw)
  To: linux-bluetooth


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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-14 13:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-12 21:35 [Bluez PATCH 1/6] Fix leak in mesh Steve Grubb
2021-05-12 23:06 ` Fix various memory leaks bluez.test.bot
  -- strict thread matches above, loose matches on Subject: below --
2021-05-14 13:58 [Bluez PATCH 1/6] Fix leak in mesh Steve Grubb

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).