2022-09-25 16:49:14

by Haochen Tong

[permalink] [raw]
Subject: [PATCH BlueZ] tools/mpris-proxy: unregister object path if player registration fails

The `owner' string, passed as user data, is freed if the player fails
registration, but the object path still exists. Upon program exiting,
the lingering path will be enumerated and the attached user data will be
freed again.
---
tools/mpris-proxy.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/tools/mpris-proxy.c b/tools/mpris-proxy.c
index 3779b6887..e5fc91fdb 100644
--- a/tools/mpris-proxy.c
+++ b/tools/mpris-proxy.c
@@ -480,6 +480,7 @@ static void add_player(DBusConnection *conn, const char *name,
reply = dbus_connection_send_with_reply_and_block(sys, msg, -1, &err);
if (!reply) {
fprintf(stderr, "Can't register player\n");
+ dbus_connection_unregister_object_path(sys, path);
free(owner);
if (dbus_error_is_set(&err)) {
fprintf(stderr, "%s\n", err.message);
--
2.37.3


2022-09-25 17:40:02

by bluez.test.bot

[permalink] [raw]
Subject: RE: [BlueZ] tools/mpris-proxy: unregister object path if player registration fails

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=680261

---Test result---

Test Summary:
CheckPatch PASS 1.24 seconds
GitLint PASS 0.80 seconds
Prep - Setup ELL PASS 26.66 seconds
Build - Prep PASS 0.70 seconds
Build - Configure PASS 8.31 seconds
Build - Make PASS 761.28 seconds
Make Check PASS 11.50 seconds
Make Check w/Valgrind PASS 290.45 seconds
Make Distcheck PASS 242.20 seconds
Build w/ext ELL - Configure PASS 8.36 seconds
Build w/ext ELL - Make PASS 84.93 seconds
Incremental Build w/ patches PASS 0.00 seconds
Scan Build PASS 493.69 seconds



---
Regards,
Linux Bluetooth

2022-09-26 18:14:03

by patchwork-bot+bluetooth

[permalink] [raw]
Subject: Re: [PATCH BlueZ] tools/mpris-proxy: unregister object path if player registration fails

Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <[email protected]>:

On Mon, 26 Sep 2022 00:31:39 +0800 you wrote:
> The `owner' string, passed as user data, is freed if the player fails
> registration, but the object path still exists. Upon program exiting,
> the lingering path will be enumerated and the attached user data will be
> freed again.
> ---
> tools/mpris-proxy.c | 1 +
> 1 file changed, 1 insertion(+)

Here is the summary with links:
- [BlueZ] tools/mpris-proxy: unregister object path if player registration fails
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=7738e9ac416b

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html