Skip to contentSkip to conversation

tools/mpris-proxy: unregister object path if player registration fails

PATCH Applied Haochen Tong 3 participants 3 messages Sep 25, 2022 – Sep 26, 2022 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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(+)
tools/mpris-proxy.c +1 -0
index 3779b6887..e5fc91fdb 100644
@@ -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);
Signature · 1 line
2.37.3
#1 lore raw

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

#2 lore raw
In reply to Haochen Tong
This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Hello:

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

Quoted 7 lines · 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!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html